[PROJ] Equivalent of OSRSetFromUserInput in proj 6 API
Even Rouault
even.rouault at spatialys.com
Tue Apr 9 01:21:11 PDT 2019
> Ok - in either of these approaches I'd need to do some pre-processing
> of the string in order to determine whether it's a "EPSG:####" format.
>
> What I'm wondering is whether there's any benefit here of porting away
> from calling OSRSetFromUserInput and then OSRExportToWkt, and whether
> doing so would end up with me just re-implementing all the logic which
> is present in OSRSetFromUserInput. (There's also a lot of extra logic
> in place regarding setting GDAL_FIX_ESRI_WKT in certain
> circumstances).
OSRSetFromUserInput() in GDAL master mostly relies on proj_create() or
proj_create_from_database() now. There is no more any GDAL_FIX_ESRI_WKT stuff
since ESRI WKT import/export has been re-implemented in PROJ itself.
There's indeed moderate interest in switching from OSRSetFromUserInput() to
proj_create(). But it could be interesting that with GDAL >= 2.5, you use
OSRExportToWktEx(hSRS, &pszWKT, apszOptions) with apszOptions[] = {
"FORMAT=WKT2_2018", nullptr } to export to WKT2. This will preserve more
metadata, and allow a few new projection methods that haven't been mapped to
WKT1.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the PROJ
mailing list