[Gdal-dev] problems with OSR

Frank Warmerdam warmerdam at pobox.com
Sat Feb 22 15:17:45 EST 2003


Gary Bishop wrote:
> Sorry to keep bugging you. Here is my code and the output it produces:
> 
> import osr
> 
> dst=osr.SpatialReference()
> print 'r1=',dst.ImportFromEPSG( 32119 )
> print 'r2=',dst.ExportToWkt()
> 
> print 'done'
> 
> $ python trypy.py
> r1= 7
> r2=
> done
> 
> Do I need some EPSG database? Does it come with gdal?Thanks for your help

Gary,

In the gdal/data directory are a bunch of .csv files containing the EPSG
tables.  In a default install they would be placed in /usr/local/share/gdal
and found their by GDAL.  If you install somewhere odd you can set the
GEOTIFF_CSV environment to point to the directory containing the .csv files.

When it succeeds ImportFromEPSG() should has a result code of 0.

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