[gdal-dev] oblique cuts on a raster using python GDAL

Naima Dambrine naima.etienne at gmail.com
Sun Nov 5 07:35:13 PST 2023


Hi ,

I have problems with oblique cuts on a raster using python GDAL (3.6.2)

- with this line i obtain black borders around :
gdal.warp('raster-dst' , raster-src', cutLineDSName='geometry-extraction.shp',
cropToCutline=True)

- with this one, the crop is not clean on closer inspection: residual black
pixels around image and white pixels appear in the image.
gdal. warp( 'raster-dst' , raster-src',
cutLineDSName='geometry-extraction.shp',
cropToCutline=True, copyMetaData=True, dstNodata=0)

I tried, without success, to refine with outputBounds=[minX, maxX, minY,
maxY], under QGIS directly ….
I've run out of ideas :/
A (naive) question comes to mind: Is it possible to make oblique cuts with
gdal.warp() & co?

Naïma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20231105/bd754406/attachment.htm>


More information about the gdal-dev mailing list