[gdal-dev] About deprecated CRS and the different behavior of EPSGGetPCSInfo and EPSGGetGCSInfo

andreaerdna andreaerdna at libero.it
Sat May 5 07:09:12 PDT 2018


Hi all,
trying to investigate two QGIS bugs [1,2], I noticed that EPSGGetPCSInfo and
EPSGGetGCSInfo (ogr\ogr_fromepsg.cpp) behave differently in the way they
deal with deprecated CRS.

In particular, while EPSGGetPCSInfo [3] appends the string " deprecated" to
the CRS name when it's flagged as deprecated in pcs.csv, EPSGGetGCSInfo [4]
does not.
This IMHO leads to some inconsistencies in how OSRImportFromEPSG and
OGRSpatialReference::importFromEPSG() initialize SRS based on EPSG GCS or
PCS code.

The behavior of EPSGGetPCSInfo was modified long ago [5] and I was not able
to trace the reason for this change and, above all, the reason why
EPSGGetGCSInfo was not modified in the same way. Anybody knows?

Anyway, I wonder if is not the case to modify also EPSGGetGCSInfo in order
to append " deprecated" to the deprecated GCSs names as EPSGGetPCSInfo does
for PCSs, or if there are some reasons for not doing so.

Hope this could help improve GDAL.

Andrea


[1] "Hide deprecated CRSs" functionality not working properly in the
Coordinate Reference System Selector dialog
https://issues.qgis.org/issues/18896
[2] Deprecated CRSs: inconsistencies in srs.db and in its update process
https://issues.qgis.org/issues/18905
[3]
https://github.com/OSGeo/gdal/blob/release/2.2/gdal/ogr/ogr_fromepsg.cpp#L958-L978
[4]
https://github.com/OSGeo/gdal/blob/release/2.2/gdal/ogr/ogr_fromepsg.cpp#L640-L648
[5] added deprecated PCS name if it is deprecated
https://github.com/OSGeo/gdal/commit/39ce2084e05d494deafb93b977a7c4c6c0b36417



-----
Andrea Giudiceandrea
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list