xproj.ProjIndexMixin._proj_set_crs

xproj.ProjIndexMixin._proj_set_crs#

ProjIndexMixin._proj_set_crs(spatial_ref, crs)#

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

Parameters:
  • spatial_ref (Hashable) – The name of the spatial reference (scalar) coordinate.

  • crs (pyproj.crs.CRS) – The new CRS attached to the spatial reference coordinate.

Returns:

Index – Either a new or an existing xarray Index.