stack_dict

Contents

stack_dict#

stack_dict(bands: list, band_xds: ~xarray.core.dataset.Dataset, save_as_int: bool, nodata: float, **kwargs) -> (<class 'xarray.core.dataarray.DataArray'>, <class 'type'>)[source]#

Stack a dictionnary containing bands in a DataArray

Parameters:
  • bands (list) – List of bands (to keep the right order of the stack)

  • band_xds (xr.Dataset) – Dataset containing the bands

  • save_as_int (bool) – Convert stack to uint16 to save disk space (and therefore multiply the values by 10.000)

  • nodata (float) – Nodata value

Returns:

Stack as a DataArray and its dtype

Return type:

(xr.DataArray, type)