DOC: Update fiona CRS compatibility for fiona 1.9+ - #1609
Merged
snowman2 merged 1 commit intoJul 25, 2026
Conversation
Fiona 1.9 added `fiona.crs.CRS`, so a dataset's `crs` attribute is now a CRS object rather than a PROJ string dictionary, and the referenced Fiona issue asking for a CRS class is resolved. Mirror the structure of the rasterio section and show passing the CRS objects directly in both directions, keeping `crs_wkt` as the fallback for older versions. This also corrects two errors in the existing example, which referenced the undefined name `dc_crs` and used `WktVersion` without importing it.
Member
|
Thanks @HugoFara 👍 |
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.
Closes #1360.
Fiona 1.9 added fiona.crs.CRS, so a dataset's crs attribute is a CRS object rather than a PROJ string dictionary, and the linked Fiona issue asking for a CRS class is resolved. This restructures the section to mirror the rasterio one, as suggested in the issue.
Also fixes two errors in the existing example: dc_crs was an undefined name, and WktVersion was used without being imported.
Verified by running every snippet verbatim against fiona 1.10.1 / GDAL 3.9.2, including a write-back round-trip. Built against PROJ 9.8.1. sphinx-build -b html docs/ succeeds; pre-commit passes; pytest test/ is unchanged from baseline.
history.rstfor all changes andapi/*.rstfor new API