odc.geo.xr.xr_coords

odc.geo.xr.xr_coords(gbox, crs_coord_name='spatial_ref', always_yx=False, dims=None)[source]

Dictionary of Coordinates in xarray format.

Parameters:
  • gbox (Union[GeoBox, GCPGeoBox]) – GeoBox or GCPGeoBox

  • crs_coord_name (Optional[str]) – Use custom name for CRS coordinate, default is “spatial_ref”. Set to None to not generate CRS coordinate at all.

  • always_yx (bool) – If True, always use names y,x for spatial coordinates even for geographic geoboxes.

  • dims (Optional[Tuple[str, str]]) – Use custom names for spatial dimensions, default is to use y,x or latitude, longitude based on projection used. Dimensions are supplied in “array” order, i.e. ('y', 'x').

Return type:

Dict[Hashable, DataArray]

Returns:

Dictionary name:str -> xr.DataArray. Where names are either as supplied by dims= or otherwise y,x for projected or latitude, longitude for geographic.