[gdal-dev] gdal_translate and -projwin

Wendell Turner wendell at enflight.com
Wed May 14 12:41:47 EDT 2008


On Wed, May 14, 2008 at 12:24:53PM -0400, Frank Warmerdam wrote:
> Wendell Turner wrote:
> >Are the projwin arguments to gdal_translate signed lat/lng?
> >I'm trying to crop a GeoTIFF image, but something is amiss.
> >
> >What should the parameters be to crop the image using
> >lat/lng?
> 
> The -projwin arguments need to be in the coordinate system of the
> image, which in this case is Mercator meters.  There is no support
> with gdal_translate currently to specify the corner coordiantes in
> long/lat unless that is the native coordinate system of the image.

Ok.  Can I use gdaltransform to convert to a system where
lat/lng is the native coordinate system?  Would that be kept
in OpenLayers?  (I noticed that in OpenLayers, the lower
left is 0,0 and the units are in pixels (I think, it doesn't
seem to be meters)).  Or would I need to read the numbers
from gdalinfo into the OpenLayers javascript and do the
mapping myself?

Thanks yet again,

Wendell



More information about the gdal-dev mailing list