<div dir="ltr"><div style="color:rgb(0,0,0);font-size:16px;font-family:Avenir-Book">Hi ,</div><div style="color:rgb(0,0,0);font-size:16px;font-family:Avenir-Book"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:Avenir-Book"><span style="font-size:medium">I have problems with oblique cuts on a raster using python GDAL (3.6.2)</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:Avenir-Book"><span style="font-size:medium"><br></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:Avenir-Book"><span style="font-size:medium">- with this line i obtain black borders around :</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:Avenir-Book"><span style="font-size:medium">gdal.warp('raster-dst' , raster-src', cutLineDSName='geometry-</span><span style="font-size:medium">extraction.shp', cropToCutline=True)</span><br></div><div style="color:rgb(0,0,0);font-family:Avenir-Book"><font size="3"><br></font></div><div style="color:rgb(0,0,0);font-family:Avenir-Book"><font size="3">- with this one, </font><span style="font-size:medium">the crop is not clean on closer inspection: residual black pixels around image and white pixels appear in the image.</span></div><div style="color:rgb(0,0,0);font-family:Avenir-Book"><span style="font-size:medium">gdal. warp( 'raster-dst' , raster-src', cutLineDSName='geometry-</span><span style="font-size:medium">extraction.shp', cropToCutline=True, copyMetaData=True, dstNodata=0)</span></div><div style="color:rgb(0,0,0);font-family:Avenir-Book"><br><span style="font-size:medium">I tried, without success, to refine with outputBounds=[minX, maxX, minY, maxY], under QGIS directly …. </span><br><span style="font-size:medium">I've run out of ideas :/ </span><br><span style="font-size:medium">A (naive) question comes to mind: Is it possible to make oblique cuts with gdal.warp() & co?</span><br><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:Avenir-Book">Naïma</div></div>