I am a newbie to OGR/OSR using Python 2.7.2, please excuse my ignorance:
I'm having problems creating spatial reference using either .ImportFromEPSG
or .ImportFromESRI(prjfile string).
Yet .SetWellKnownGeogCS works fine.
from osgeo import ogr
import osr,os
testSR = osr.SpatialReference()
testSR.SetWellKnownGeogCS("WGS84")
print testSR.ExportToPrettyWkt()
#returns
#GEOGCS["WGS 84",
# DATUM["WGS_1984",
#....and so on...
testSR.ImportFromEPSG(4326)#returns 6
print testSR.ExportToPrettyWkt() #returns zero length string
prjFile = open('c:/test/GCS_WGS84.prj')
strPrj = prjFile.readline() #returns string with len 145
testSR.ImportFromESRI(strPrj)#returns 5
print testSR.ExportToPrettyWkt() #returns zero length string
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev