Best practice around PROJ version / included datum ensemble members #110
jorisvandenbossche
started this conversation in
General
Replies: 1 comment 2 replies
-
This is a unfortunate bug in PROJ that I've just fixed in OSGeo/PROJ#3221 and whose fix will go in PROJ 9.0.1. Of course, I can't fix the past... |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the geopandas test suite, I am running into the following issue: if you save a geoparquet file with a recent PROJ version (and use it to create the PROJJSON representation of the crs), and then read it with software that uses an older PROJ version, this fails in you run into unknown IDs.
I specifically ran into this with a crs of EPSG:4326 (but OGC:CRS84 has the same issue), where PROJ uses an ensemble datum for this crs. Depending on the database version included in PROJ, the datum ensemble might get new datum additions. But those new datums are not known by older versions of the database.
For example, with a recent version of PROJ, the datum ensemble now includes "WGS 1984 G2139" (EPSG:1309), but that's not part of the EPSG database included in an older version of PROJ.
Of course this is a general issue. You can also run into this with just an actual crs that didn't exist yet in an older version of the database), but in that case I think the user can be held responsible to choose a CRS that already exists for some time to have it compatible with older PROJ versions. While for a crs with a datum ensemble (like EPSG:4326 and OGC:CRS84), 1) the actual crs (the top-level ID) actually already existed before as well, and 2) it is also normal that the datum ensemble gets updated (that's the point of the ensemble).
Do we have any recommendation about how to deal with this situation?
We could recommend geoparquet writers to not include the actual ensemble members for those cases? (like the example JSON object for OGC:CRS84 at https://github.com/opengeospatial/geoparquet/blob/main/format-specs/geoparquet.md#ogccrs84-details) Or does that defeat the purpose of using a datum ensemble? (although for PROJ itself for doing a transformation, it doesn't really matter in practice if you don't use an epoch?)
Or should a PROJJSON consumer try to be more flexible for this case? (and ignore unknown datum ensemble members / just check the top-level EPSG:4326 ID)
cc @rouault
Example error of parsing a PROJJSON object for EPSG:4326 (produced with PROJ 8.2) using PROJ 7.0:
PROJJSON object (dict version):
Reading using pyproj:
Beta Was this translation helpful? Give feedback.
All reactions