4

QGIS (current 3.4.4 version) have almost all its CRS definitions as EPSG Authority codes.

But many of them are not registered in the https://www.epsg-registry.org/ database, so many of them really have not an EPSG Authority.

By the side, at this moment that lack of support is causing QGIS not recognizing the CRS of the layers exported to non-EPSG authority codes, as can be seen in the following posts:
- Several projection issues QGIS 3.4.3
- CRS information not recognized when geopackage is loaded

I'm trying to understand the QGIS CRS codes (sr_id and auth_name fields of the tbl_srs table, in srs.db) database, and how QGIS writes and reads the CRS of the layers and try to match them with its database.

And what I can not find is the reason: Why almost all the codes in the QGIS database carry the EPSG Authority when really many of them are not in the EPSG registry?

1

1)
On Windows, if you inspect the Drive:/Program Files/QGIS 3.4/share/gdal directory, you can get an idea of how GDAL (and by-extension, QGIS) organizes and relates (tie-up) the various EPSG and non-EPSG codes.

If you prefer to check the files in the data directory on Github, remember to switch to the latest release branch.

2)
The cause of the problem mentioned in your links appears to be a simple disagreement between the QGIS team and the GDAL team over the value for AUTHORITY (for CRS). In GDAL, the AUTHORITY for CRS 102003 is "Esri", while QGIS insisted it to be "EPSG". Hopefully, the GDAL or QGIS team (or both of them) fixes this soon. In the meanwhile, you can try this workaround. On Windows:-

  1. Close/End QGIS if it is running.
  2. Go to Drive:/Program Files/QGIS 3.4/share/gdal
  3. Make a backup of esri_extra.wkt
  4. Open esri_extra.wkt with any text editor, find "102003" and change "Esri" to "EPSG".

enter image description here

  1. This change will cause newly-created files (by QGIS and GDAL/OGR command line tools) to have "EPSG" as the AUTHORITY for CRS 102003. (It does nothing for the previously-created files, however.)
  2. Caveat: I do not know how the QGIS or GDAL team will resolve this bug in a future release, and how the new release will impact this workaround. At least - this will keep QGIS from complaining and kicking Users into EPSG 4326.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.