[gdal-dev] About deprecated CRS and the different behavior of EPSGGetPCSInfo and EPSGGetGCSInfo
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  appends the string " deprecated" to
the CRS name when it's flagged as deprecated in pcs.csv, EPSGGetGCSInfo 
This IMHO leads to some inconsistencies in how OSRImportFromEPSG and
OGRSpatialReference::importFromEPSG() initialize SRS based on EPSG GCS or
The behavior of EPSGGetPCSInfo was modified long ago  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.
Taking a better look at importFromEPSG and how it's used by QGIS
QgsCoordinateReferenceSystem::syncDb(), I think that it will be useful to
uniform also the names of deprecated **GEOCCS** (Geocentric Coordinate
Systems) implementing your fix in **SetEPSGGeocCS** ('cause there's no
Just for completeness, the behavior of SetEPSGCompdCS and SetEPSGVertCS
(that are also used by importFromEPSG) about deprecated CS does not affect
QgsCoordinateReferenceSystem::syncDb(): in fact for compound coordinate
system (COMPD_CS), syncDB always use the related horizontal projcs or geogcs
name, while for vertical coordinate system it does not care of the name.
Re: About deprecated CRS and the different behavior of EPSGGetPCSInfo and EPSGGetGCSInfo
On samedi 9 juin 2018 03:19:30 CEST andreaerdna wrote:
> Do you think it would be appropriate and safe to back port in 2.3 brach the
> commits  about the name of deprecated GeoGCSs and GeoCCSs, now that 2.3.1
> version is scheduled?
Those are functional changes that could potentially break code that would rely
on the CRS name without the " (deprecated)" suffix.