xrspatial.surface_distance.surface_allocation#

xrspatial.surface_distance.surface_allocation(raster: DataArray, elevation: DataArray, x: str = 'x', y: str = 'y', target_values: list = [], max_distance: float = inf, connectivity: int = 8, method: str = 'planar') DataArray[source]#

Compute nearest-target allocation along terrain surface.

For each pixel, returns the value of the nearest target pixel by surface distance through the elevation model.

Parameters:
Returns:

2-D array of allocation values (float32).

Return type:

xr.DataArray or xr.Dataset