[Gdal-dev] Latitude view thinner than it should be

Frank Warmerdam warmerdam at pobox.com
Tue Oct 4 09:19:21 EDT 2005


On 10/4/05, Josepo Urrutia <find_all at hotmail.com> wrote:
> I need to do the projection in Transverse Mercator (UTM).
>
> I've been surfing on the net looking for some info and have found the way to
> convert a Lat/Lon position to a UTM position wich gives me a value of meters
> form the ecuator for the latitude and a value of meters form the central
> meridian for the longitude.
>
> But now, How can I do the projection to the screen?

Josepo,

I'm not clear on what you are using as rendering technology.  The
simpliest approach would be to reproject your data into UTM before
rendering.

eg.

ogr2ogr -t_srs '+proj=utm +zone=11 +datum=WGS84' out_dir mys57data.000

Alternatively, you can create an OGRCoordinateTransformation object
going from lat/long to UTM and pass it to the transform() method on each
OGRGeometry you get them back from GetNextFeature().

More information on using coordinate transformation in the OGR API is
available at:

  http://www.gdal.org/ogr/osr_tutorial.html

Also check the transform() method at:

  http://www.gdal.org/ogr/classOGRGeometry.html#a24

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