Fix tests for PROJ 9.7.0 and newer #1557
Merged
snowman2 merged 2 commits intopyproj4:mainfrom Dec 7, 2025
Merged
Conversation
85887ed to
cbac679
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1557 +/- ##
==========================================
- Coverage 96.55% 95.85% -0.71%
==========================================
Files 20 20
Lines 1827 1832 +5
==========================================
- Hits 1764 1756 -8
- Misses 63 76 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@snowman2 |
Member
|
Thanks @phaarnes 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix tests to pass for PROJ 9.7.0+ EPSG database changes
Description
This PR updates two tests (
test_datum_horizontalandtest_sub_crs) that fail with PROJ 9.7.0+ due to changes in the EPSG database.Background
Starting with PROJ 9.7.0 (which includes EPSG v12.022), the EPSG database introduced national realizations of ETRS89 to better reflect how countries actually implement the European Terrestrial Reference System.
Norway uses ETRS89-NOR (also known as EUREF89), which is a specific national realization tied to epoch 1995. This is technically more correct than using the generic ETRS89 ensemble, as Norway's coordinates are tied to a specific realization.
What changed in PROJ 9.7.0
For Norwegian CRS definitions:
Similar changes have been made for other Nordic countries (Denmark, Sweden, Finland) and will likely continue for other nations.
Changes
PROJ_GTE_97version check constant intest/conftest.pytest_datum_horizontalto test against the appropriate datum based on PROJ versiontest_sub_crsto test against the appropriate projected CRS (EPSG:25832 or EPSG:11022) based on PROJ version