[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.


[1] "Hide deprecated CRSs" functionality not working properly in the
Coordinate Reference System Selector dialog
[2] Deprecated CRSs: inconsistencies in srs.db and in its update process
[5] added deprecated PCS name if it is deprecated

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

More information about the gdal-dev mailing list