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

Stack a dictionnary containing bands in a DataArray

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

  • band_dict (dict) – Dict containing the bands as xr.DataArray {band_name, band}

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

  • nodata (float) – Nodata value


Stack as a DataArray and its dtype

Return type:

(xr.DataArray, type)