Jason Roberts wrote:
Yes. Or... you could cheat a bit. In the case of a shapefile, the spatial
reference is written in a .prj file. So technically you can create a fake
empty
shapefile with the right spatial reference, close it, rename the .prj to
have
the same basename as your shapefile of interes and re-open it.
Ah, excellent. Thanks for this suggestion!
It looks like the .prj file simply contains the WKT. Would it be sufficient
to just call OGRSpatialReference::exportToWKT and write the string to the
.prj file directly? In my situation that would be slightly cleaner. If this
is a good approach, should I also call morphToESRI first, if I know the
coordinate system has not already been morphed to ESRI?
Jason,
Yes, this would be appropriate. Note that in all but exceptional circumstances
the OGRSpatialReference is *not* in ESRI format, so you should expect to
call morphToESRI() before exporting to WKT.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, [email protected]
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev