odc.geo.xr.wrap_xr

odc.geo.xr.wrap_xr(im, gbox, *, time=None, nodata=None, crs_coord_name='spatial_ref', **attrs)[source]

Wrap xarray around numpy array with CRS and x,y coords.

Parameters
  • im (Any) – numpy array to wrap, last two axes are Y,X

  • gbox (GeoBox) – Geobox, must same shape as last two axis of im

  • time – optional time axis value(s), defaults to None

  • nodata – optional nodata value, defaults to None

  • attrs – Any other attributes to set on the result

Return type

DataArray

Returns

xarray DataArray