[gdal-dev] Converting raster pixel space to geospace

Even Rouault even.rouault at mines-paris.org
Wed Jul 15 16:13:30 EDT 2009


Le Wednesday 15 July 2009 20:50:15 Smart, Gary, vous avez écrit :
> Thanks for that! :-)
>
> ... without appearing too cheeky,
> Could you point me to a page which would help me translate the x/y returned
> from the transformation (presumably easting/northing in metres?), into
> WGS84 Lat/Long?

The x,y returned by the translation depend of the coordinate system of the 
raster (returned by GDALGetProjectionRef()). For a geographic coordinate 
system, generally you get x = longitude, y = latitude. For a UTM projection, 
x = easting, y = northing. For other projections, it depends on the units of 
the projection system.

For conversion between coordinate systems, you're interested in OSR then. See 
http://gdal.org/ogr/osr_tutorial.html and 
http://gdal.org/ogr/ogr__srs__api_8h.html



More information about the gdal-dev mailing list