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
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to