Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
19b41ae
FEAT: Implement Zarr spatial and proj conventions support with parsin…
emmanuelmathot Dec 12, 2025
608f3a9
FEAT: Enhance spatial dimension handling to prioritize 'spatial:dimen…
emmanuelmathot Dec 12, 2025
4a88399
FEAT: Implement Zarr conventions declaration and validation functions…
emmanuelmathot Dec 12, 2025
606a7d7
REFAC: Simplify PROJJSON handling in crs_from_user_input function
emmanuelmathot Dec 12, 2025
9fc918d
Add support for Zarr spatial and proj conventions
emmanuelmathot Dec 12, 2025
773b50a
docs: Update history and documentation for Zarr support
emmanuelmathot Dec 13, 2025
350efad
FEAT: Update Zarr conventions to default to WKT2 format and enhance c…
emmanuelmathot Dec 13, 2025
6c9708a
FEAT: Update convention handling to default to None and prefer CF whe…
emmanuelmathot Dec 13, 2025
6bcec17
FEAT: Enhance Zarr convention handling with new write_conventions met…
emmanuelmathot Dec 13, 2025
3d1340f
FEAT: Enhance fallback handling for Zarr conventions in dimension and…
emmanuelmathot Dec 13, 2025
cee37b9
FEAT: Update Zarr conventions handling in writing functions and impro…
emmanuelmathot Dec 13, 2025
8cdb7bb
FEAT: Update documentation and examples for Zarr conventions handling…
emmanuelmathot Dec 13, 2025
e15cffc
Implement feature X to enhance user experience and optimize performance
emmanuelmathot Dec 13, 2025
6480bed
FEAT: Update tests for Zarr convention handling and improve assertion…
emmanuelmathot Dec 13, 2025
008b325
FEAT: Refactor Zarr convention functions for improved readability and…
emmanuelmathot Dec 13, 2025
4682037
FEAT: Update example notebook to include execution counts and output …
emmanuelmathot Dec 13, 2025
429e767
FEAT: Update documentation to include links for Zarr conventions
emmanuelmathot Dec 13, 2025
b7d1c7d
FEAT: Update documentation and examples for Zarr conventions and impr…
emmanuelmathot Dec 13, 2025
6b6070b
REFAC: Simplify error handling and improve readability in spatial met…
emmanuelmathot Dec 13, 2025
41b5983
REFAC: Remove unnecessary blank lines in test_convention_architecture…
emmanuelmathot Dec 13, 2025
cad8ecb
REFAC: Update convention checks to use 'is' for identity comparison i…
emmanuelmathot Dec 13, 2025
f0389ca
REFAC: Remove redundant import of EXPORT_GRID_MAPPING and get_option …
emmanuelmathot Dec 15, 2025
500e781
REFAC: Rename spatial metadata functions for clarity and consistency …
emmanuelmathot Dec 15, 2025
062ed4b
REFAC: Remove unused format parameters and streamline CRS writing in …
emmanuelmathot Dec 18, 2025
8b01209
Refactor code structure for improved readability and maintainability
emmanuelmathot Dec 18, 2025
46e1487
Merge branch 'master' into zarr_conventions
emmanuelmathot Jan 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion rioxarray/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ def crs_from_user_input(crs_input: Any) -> rasterio.crs.CRS:
Parameters
----------
crs_input: Any
Input to create a CRS.
Input to create a CRS. Can be:
- rasterio.crs.CRS object
- WKT string
- PROJ string
- EPSG code (int or string)
- PROJJSON dict (Zarr proj:projjson format)

Returns
-------
Expand All @@ -29,6 +34,18 @@ def crs_from_user_input(crs_input: Any) -> rasterio.crs.CRS:
"""
if isinstance(crs_input, rasterio.crs.CRS):
return crs_input

# Handle PROJJSON dict (Zarr proj:projjson convention)
if isinstance(crs_input, dict):
try:
# Use pyproj to parse PROJJSON, then convert to rasterio CRS
crs = CRS.from_json_dict(crs_input)
if version.parse(rasterio.__gdal_version__) > version.parse("3.0.0"):
return rasterio.crs.CRS.from_wkt(crs.to_wkt())
return rasterio.crs.CRS.from_wkt(crs.to_wkt("WKT1_GDAL"))
except Exception:
pass

try:
# old versions of opendatacube CRS
crs_input = crs_input.wkt
Expand Down
Loading