xproj.ProjIndexMixin

Contents

xproj.ProjIndexMixin#

class xproj.ProjIndexMixin#

Mixin class that marks XProj support for an Xarray index.

An xarray.Index that inherits from this mixin class is identified by XProj as a CRS-aware index (note that an Xarray index that simply has a crs property may also be identified as such, although it may lack some XProj support).

_proj_crs_equals(other[, allow_none])

Helper method to check if this CRS-aware index has the same CRS than the other given CRS-aware index.

_proj_set_crs(spatial_ref, crs)

Method called when mapping a CRS to index coordinate(s) via xarray.Dataset.proj.map_crs().

_proj_to_crs(spatial_ref, crs)

Method called when mapping a CRS to index coordinate(s) via xarray.Dataset.proj.map_crs() with transform=True.

crs

Returns the coordinate reference system (CRS) of the index as a pyproj.crs.CRS object, or None if CRS is undefined.