xrspatial.utils.multi_overlap#
- xrspatial.utils.multi_overlap(agg, func, n_outputs, depth, boundary='nan', dtype=None)[source]#
Run a multi-output kernel via a single overlap + map_blocks call.
funcreceives a padded 2-D chunk and returns(n_outputs, H, W)– the unpadded interior for each output band. The result is a 3-D DataArray with a leadingbanddimension.- Parameters:
agg (xr.DataArray) – 2-D input raster.
func (callable) –
(H+2*dy, W+2*dx) -> (n_outputs, H, W)n_outputs (int) – Number of output bands (>= 1).
depth (int or tuple of int) – Per-axis overlap (>= 1 on each axis).
boundary (str) – Boundary mode: ‘nan’, ‘nearest’, ‘reflect’, or ‘wrap’.
dtype (numpy dtype, optional) – Output dtype. Defaults to input dtype.
- Returns:
Shape
(n_outputs, H, W)withbandleading dimension.- Return type:
xr.DataArray