xrspatial.zonal.regions(raster: xarray.core.dataarray.DataArray, neighborhood: int = 4, name: str = 'regions')xarray.core.dataarray.DataArray[source]

Create unique regions of raster based on pixel value connectivity. Connectivity can be based on either 4 or 8-pixel neighborhoods. Output raster contain a unique int for each connected region.

raster : xarray.DataArray connections : int (default = 4)

4 or 8 pixel-based connectivity

name: str (default = ‘regions)

output xr.DataArray.name property


Area Numbering implementing based on: