- stackstac.mosaic(arr, dim=None, axis=0, *, reverse=False, nodata=nan, split_every=None)#
Flatten a dimension of a
DataArrayby picking the first valid pixel.
The order of mosaicing is from last to first, meaning the last item is on top.
Hashable]) – The dimension name to mosaic. Default: None.
int]) – The axis number to mosaic. Default: 0. If
bool) – If False (default), the last item along the dimension is on top. If True, the first item in the dimension is on top.
The value to treat as invalid. Default: NaN.
To catch common mis-use, raises a
nodata=nanis used when the array has an integer or boolean dtype. Since NaN cannot exist in those arrays, this indicates a different
nodatavalue needs to be used.
For Dask arrays: how many chunks to mosaic together at once.
The Dask default is 4. A higher number will mean a smaller graph, but higher peak memory usage.
Ignored for NumPy arrays.
- Return type: