Daniele Romagnoli wrote:
Hi again list,
I'm building a shapefile and, when setting the CRS, I use this code:
.....
t_srs = osr.SpatialReference()
t_srs.SetFromUserInput("EPSG:32632")
....
Looking at the generated PRJ, I see it uses the ESRI WKT definition [1].
Is there a way to get the OGC definition [2] instead? (This one is preserving the EPSG authority code inside)

Daniele,

ESRI .prj files are supposed to be in ESRI format, and so the shapefile
driver morphs appropriately.  There is no way to tell it not to.

However, you can export the srs to WKT and write it over the .prj file
if you want.

eg. (in python)

open('basename.prj','w').write(t_srs.ExportToWkt())

--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to