[Gdal-dev] UTM to Lat/Lon

mathieu_gdal mathieu_gdal at yahoo.fr
Thu Jul 3 05:10:14 EDT 2003

Dear All,


I am a GDAL beginner, and I have a very basic question.

(It is probably a FAQ)


I have some TIF file defined in UTM (zone 19N), NAD27.

I can retrieve from those tif :

       - The ProjectionRef (PROJCS["NAD27 / UTM zone
19N",GEOGCS["NAD27", . and so on.)

       - And the 6 affine transformation coefficients 


I would like to implement to raster projection: Converting a pixel
coordinate (in the bitmap) into a position in Lat/Lon coord system (in
WGS84 for example)


I guess the way to do it is:

1) Convert from pixel coordinate to the geotiff file coordinate system,
ie in my case UTM zone 19, in meters. (There is no problem for that, I
will use the affine coefficients)

2) Convert from the geotiff file coordinate system to lat/lon system.


(u,v)Pixel ---------1----------> UTM(x,y) meters ---------2---------->


How to do 2) ??

Am I on the right way?

Do you have a sample doing this kind of projection?



Note : I have tried to create a OGRCoordinateTransformation with my
file's OGRSpatialReference and a simple lat/lon OGRSpatialReference. It
does not work, even if the transformation seems to be well created.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20030703/e99ce546/attachment.html

More information about the Gdal-dev mailing list