[Gdal-dev] UTM to Lat/Long projection

Frank Warmerdam fwarmerdam at gmail.com
Wed May 4 15:10:44 EDT 2005


On 5/4/05, Ilya Serebrianik <predator2448 at hotmail.com> wrote:
> 
> Hello Frank, 
>   
>        Thanks for clearing this up. I am not sure how to project from UTM
> NAD83 to Lat/Long WGS84. In your example application, namely gdalwrap, there
> is a option "+proj=latlong" which would be specified for the -t_srs in order
> to go from whatever the projection of the source into lat and long, I tried
> that and it works, but I do not know how to set this up inside my code, I
> tried using importFromProj4("+proj=longlat"), which should
> automatically set the lat/long option into the srs object I am about to
> assign to the destination image, like this: 

Ilya, 

And did the example you gave not work? In what way does it fail? 
Do the pszSrcWKT and pszDstWKT seem OK? 
   
> OGRSpatialReference oSRS; 
>     //oSRS.SetUTM(17, TRUE); 
>     //oSRS.SetWellKnownGeogCS("WGS84");
>  oSRS.importFromProj4("+proj=longlat"); 

I would encourage you to be specific about the datum.  So 
you could do:

  oSRS.importFromProj4( "+proj=latlong +datum=WGS84" );

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