[Gdal-dev] Problem with gdal_translate

Frank Warmerdam warmerdam at pobox.com
Mon Jan 11 15:24:28 EST 2010


NopMap wrote:
> 
> Hi!
> 
> I am trying to make a GeoTiff a little bit smaller with gdal_translate.
> 
> Gdalinfo shows that the TIF has the following size:
> Upper Left  ( 1102062.959, 6818226.972) (  9d54'0.00"E, 52d 6'0.00"N)
> Lower Right ( 1692080.162, 6257943.762) ( 15d12'0.77"E, 48d54'0.71"N)
> 
> I call
> gdal_translate -projwin 9.91 52.09 15.19 48.91 in.tif out.tif
> 
> The coordinates should be within the bounds of the TIF, but I get the error
> Input file size is 7719, 7330
> Computed -srcwin -14417 89199 0 0 from projected window.
> Computed -srcwin falls outside raster size of 7719x7330.
> 
> What am I doing wrong?
> Is there another/better way to do this?

Nop,

You need to specify the corners in the coordinate system of the
image.  So the values should be the meter based projected coordinates
like 1102062,6818226.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list