[gdal-dev] Python gdal -- Class or function equivalent to `gdaltransform'

Frank Warmerdam warmerdam at pobox.com
Fri Aug 21 22:03:52 EDT 2009


Jonathan Sawyer wrote:
> Good evening developers,
> 
> I am very new to GDAL, so please bear with me.
> 
> What function/class/module do I need to look at to perform coordinate 
> transformation, in Python?
> 
> Or better yet, can anyone point me to good online docs to learn how the 
> Python bindings are used in gdal?
> 
> FYI: I am looking for the equivalent to this command line example:
> 
> $ gdaltransform -s_srs EPSG:4326 -t_srs EPSG:3338
> -146.673599867, 64.7163624865
> 348408.577415968 1658661.40355536 0
> 
> Have a good weekend, and thanks for your help.

Jonathan,

There are some pointers to sample python scripts at:

   http://trac.osgeo.org/gdal/wiki/GdalOgrInPython

The tolatlong.py script has some example script for transforming
points:

   http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/tolatlong.py

Good luck,
-- 
---------------------------------------+--------------------------------------
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