Tags: xarray-contrib/xproj
Tags
Refactor CRS-aware index (#27) * refactor CRS-aware index ProjIndexMixin class: - replace the ``_proj_get_crs`` abstract method by the ``crs`` abstract (public) property. - add ``_proj_crs_equals`` helper method Xproj now identifies an Xarray index as CRS-aware if it has a ``crs`` property that returns either a ``pyproj.CRS`` object or ``None``. A CRS-aware index may have an undefined CRS (``None``). Add ``CRSAwareIndex`` protocol class. * add a couple of CRS utility functions Copied and adapted from xvec. * CI: mypy install additional types * doc: add crs property in mixin class API * docstring tweaks * misc. typing fixes * ci: temp fix (xarray upstream)
[pre-commit.ci] pre-commit autoupdate (#23) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.11.4](astral-sh/ruff-pre-commit@v0.8.6...v0.11.4) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Accessor: add methods to write or clear CRS info (#20) * refactor accessor: internal util to get CRS(Index) * add .proj.write_crs_info() + tests * improve docs * spatial ref coord access: improve error message * add .proj.clear_crs_info method * refactor (dry) * doc: add usage example + misc improvement * fix mypy * nit