[gdal-dev] Re: trying to get lat/lon out of sdts dem

Frank Warmerdam warmerdam at p...
Tue Oct 23 18:05:30 EDT 2001



nakiya123 at y... wrote:

> double dfGeorefX=0.0, dfGeorefY=0.0;


I think the above line is your problem. You are starting with
a dfGeorefX and dfGeorefY of (0,0), which is the bottom left corner
of the UTM zone. You need to set the initial dfGeorefX and dfGeorefY
values based on the GeoTransform as I showed in my email. Note that
the OGRCoordinateTransformation is only used to transform a correct
UTM coordinate to lat/long. It doesn't know anything about how to
determine the original utm coordinates.

Best regards,


-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
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