[gdal-dev] gdalwarp + cutline and change extent
Paul Meems
bontepaarden at gmail.com
Fri Jun 3 00:12:25 PDT 2016
Hi,
Currently we're using GDAL v1.10
We need to clip a piece out of a larger tiff file using a shapefile.
When we use this command:
gdalwarp -cutline Field9.shp -crop_to_cutline -wo
"CUTLINE_ALL_TOUCHED=TRUE" input.tif output.tif
We get a nicely cropped tiff-file like we want. But the pixels have shifted
towards the cutline making the input and output tiff files no longer align.
When we use the command without -crop_to_cutline:
gdalwarp -cutline Field9.shp -wo "CUTLINE_ALL_TOUCHED=TRUE" input.tif
output.tif
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.
What is the correct command to keep the pixels aligned AND crop the extent
of the output file.
Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160603/c0cfc46e/attachment.html>
More information about the gdal-dev
mailing list