[gdal-dev] Re: Using gdalwarp to effectively trim an image

drshinnick drshinnick at hotmail.com
Sat Mar 17 11:37:00 EDT 2012


The problem seems to have been related to the presence of a .prj file with
the .shp file.

using the command

gdalwarp -cutline .\shp -cl allROIs -cwhere "Item = 1642" .\1642\1642.bmp
.\1642.tif

seems to fail to compute cutline bounding box when there is a .prj file
present for the .shp and the target image has no georeference embeded as
with a geotiff.  Here in this case I was trying to trim a .bmp so that was
that I think was the reason.

However remove the .prj from the .\shp directory and it works! 
Alternatively, I can specify the -s_srs and -t_srs as the same and this also
works although it does throw a warning that the input vector layer has an
srs while the raster does not.  As long as the two are in the same
projection.  No problem I think.


-Dan



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Using-gdalwarp-to-effectively-trim-an-image-tp4621161p4628208.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list