<div dir="ltr">Hi,<div><br></div><div>Currently we're using GDAL v1.10</div><div>We need to clip a piece out of a larger tiff file using a shapefile.</div><div><br></div><div>When we use this command:</div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px">gdalwarp -cutline Field9.shp </span><font color="#263238"><span style="line-height:16px">-crop_to_cutline</span></font><span style="color:rgb(38,50,56);font-size:13px;line-height:16px"> -wo "CUTLINE_ALL_TOUCHED=TRUE" input.tif output.tif</span></div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px">We get a nicely cropped tiff-file like we want. But the pixels have shifted towards the cutline m</span><span style="color:rgb(38,50,56);font-size:13px;line-height:16px">aking the input and output tiff files no longer align.</span></div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px"><br></span></div><div><div>When we use the command without -<font color="#263238"><span style="line-height:16px">crop_to_cutline</span></font>:</div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px">gdalwarp -cutline Field9.shp </span><span style="color:rgb(38,50,56);font-size:13px;line-height:16px">-wo "CUTLINE_ALL_TOUCHED=TRUE" input.tif output.tif</span></div></div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px">We get a cut tiff-file which aligns correctly with the pixels of the input file but all pixels outside the the cutline are set to nodata and the extent of the output file is the same as the input file.</span></div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px"><br></span></div><div><font color="#263238"><span style="line-height:16px">What is the correct command to keep the pixels aligned AND crop the extent of the output file.</span></font></div><div><font color="#263238"><span style="line-height:16px"><br></span></font></div><div><font color="#263238"><span style="line-height:16px">Thanks,</span></font></div><div><font color="#263238"><span style="line-height:16px"><br></span></font></div><div><font color="#263238"><span style="line-height:16px">Paul</span></font></div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px"><br></span></div><div><span style="color:rgb(38,50,56);font-size:13px;line-height:16px"><br></span></div><div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><br>
</div></div></div></div></div>
</div></div>