[gdal-dev] Reprojection of textual lat-longs from Python script

Frank Warmerdam warmerdam at pobox.com
Thu Oct 16 11:11:51 EDT 2008


James_Cook at blm.gov wrote:
> I understand that GDAL/OGR includes the Proj.4 library, but I haven't found
> any documentation explaining how I can transform a textfile of NAD27
> coordinates to NAD83 from a Python script.  Can anyone point me in the
> right direction?

Jim,

There is some information on GDAL/OGR coordinate system services (in terms
of the C++ API) at:

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

You might also find the following python script useful as an example
of coordinate system services:

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

Also, from the commandline you could use the following to transform
a text file of NAD27 points to NAD83:

  gdaltransform -s_srs NAD27 -t_srs NAD83 < nad27.txt > nad83.txt

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