Skip to content

DOC: Update fiona CRS compatibility for fiona 1.9+ - #1609

Merged
snowman2 merged 1 commit into
pyproj4:mainfrom
HugoFara:DOC_update-fiona-crs-compatibility
Jul 25, 2026
Merged

DOC: Update fiona CRS compatibility for fiona 1.9+#1609
snowman2 merged 1 commit into
pyproj4:mainfrom
HugoFara:DOC_update-fiona-crs-compatibility

Conversation

@HugoFara

Copy link
Copy Markdown
Contributor

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.

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.
@snowman2
snowman2 merged commit 5818a3e into pyproj4:main Jul 25, 2026
7 of 16 checks passed
@snowman2

Copy link
Copy Markdown
Member

Thanks @HugoFara 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: Converting from fiona CRS to pyproj.crs.CRS

2 participants