Conversation
Additionally: stop asserting on "init=epsg:dddd" as this is no longer recommended usage.
sgillies
commented
Oct 21, 2024
sgillies
commented
Oct 21, 2024
sgillies
commented
Oct 21, 2024
sgillies
commented
Oct 21, 2024
| @pytest.mark.parametrize("crs", [CRS.from_epsg(4326), CRS.from_string("EPSG:4326")]) | ||
| def test_epsg_4326_ogc_crs84(crs): | ||
| """EPSG:4326 not equivalent to OGC:CRS84.""" | ||
| assert CRS.from_string("OGC:CRS84") != crs |
Member
Author
There was a problem hiding this comment.
Note: while GDAL and Rasterio may treat these as equivalent, they are not equivalent.
I don't think it matters very much. Nobody uses "OGC:CRS84" except me 😆 The rest of the FOSS4G world still uses "EPSG:4326" and won't be making this comparison. But it's still good to be correct, I think.
vincentsarago
approved these changes
Oct 21, 2024
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.
Change to
CRS.__eq__()is based on #3208.Several evaluations of
to_epsg(), which is slow, are replaced by a check ofCRS._epsg.A notable change in behavior is that
CRS.from_epsg(4326).to_dict()no longer returns{"init": "epsg:4326"}, but the full PROJ definition. PROJ4 init files aren't quite deprecated yet, but we need to steer users away from this. See #1809 (comment) (which I'll try to replace with a better reference).