[gdal-dev] Converting raster pixel space to geospace
Even Rouault
even.rouault at mines-paris.org
Tue Jul 14 15:18:22 EDT 2009
Le Tuesday 14 July 2009 20:58:01 Smart, Gary, vous avez écrit :
> OK - having messed with GDAL for a couple of days now, I can display
> imagery using the GDAL c++ classes to extract raster tiles.
>
>
>
> However, I now need to be able to convert xPixel/Line couplets to
> geo-positions (UTM, LL or whatever). I have scanned the classes and
> have failed to come across a method that maps from pixel space to
> geo-space (and the inverse for that matter). I presume such methods
> exists - can anyone point me to them?
GDALApplyGeoTransform() will convert from pixels to georeferenced positions
and GDALInvGeoTransform() will invert the geotransform matrix, so using
GDALApplyGeoTransform() on that inverted matrix will do the reverse
conversion (georeferenced positions --> pixel positions)
See http://gdal.org/gdal_8h.html for all info.
>
>
>
> Gary
More information about the gdal-dev
mailing list