xproj.CRSIndex

xproj.CRSIndex#

class xproj.CRSIndex(crs)#

A basic xarray.Index that has a pyproj.crs.CRS attached.

This index must be associated with a scalar coordinate variable.

Best way to create a CRSIndex is via either xarray.Dataset.proj.assign_crs() or xarray.Dataset.set_xindex() (or the DataArray equivalent methods).

This index is used for propagation of the CRS information through Xarray operations and for CRS-aware alignment of Xarray objects (only checking strict equality, automatic re-indexing / re-projection is not supported). It doesn’t support CRS-aware data selection.

__init__(crs)#
Parameters:

crs (Any) – The coordinate reference system to attach to the index in any format that can be passed to pyproj.crs.CRS.from_user_input().

Attributes

crs

Returns the pyproj.crs.CRS object attached to this index.