xrspatial.zonal_stats
How xarray-spatial runs Zonal statistics: xrspatial.zonal_stats.
| Engine | xarray-spatial |
|---|---|
| Tool name | xrspatial.zonal_stats |
| Interface | python |
| Implements | Zonal statistics |
| Documentation | Not stated |
| Effects | modifies input: no, network: no |
| Notes | Not stated |
| Status | active |
Parameters
| Name | Type | Required | Default | Choices | Note |
|---|---|---|---|---|---|
zones | any | yes | Not stated | Not stated | Not stated |
values | xr.DataArray | yes | Not stated | Not stated | Not stated |
zone_ids | Optional[List[Union[int, float]]] | no | Not stated | Not stated | Not stated |
stats_funcs | Optional[Union[Dict, List]] | no | Not stated | Not stated | Not stated |
nodata_values | Union[int, float] | no | Not stated | Not stated | Not stated |
return_type | str | no | pandas.DataFrame | Not stated | Not stated |
column | Optional[str] | no | Not stated | Not stated | Not stated |
rasterize_kw | Optional[dict] | no | Not stated | Not stated | Not stated |
How it maps to the operation
| Operation parameter | Parameter here | Note |
|---|---|---|
raster | values | Not stated |
zones | zones | Not stated |
stats | stats_funcs | count = count; mean = mean; min = min; max = max; sum = sum; std = std |
Differences from the operation
- Zones are a raster of zone ids on the same grid as values (polygons need rasterizing first); returns a pandas DataFrame per zone id.
Harvested by the python-packages harvester from engine version
0.10.20. Names can change when an engine is harvested again.