stackstac.array_epsg

stackstac.array_epsg(arr, default='__no_default__')

Get the coordinate reference system of a DataArray as an EPSG code.

Parameters
  • arr (DataArray) – The DataArray to get the CRS of.

  • default (Union[int, Literal[‘__no_default__’]]) – If the CRS cannot be determined and this is given, return this instead. Otherwise, raise an error.

Returns

EPSG code

Return type

int

Raises

ValueError: – If the DataArray has no epsg coordinate, and default is not given.