Zonal Statistics
zonal_statisticsCompute per-polygon statistics from a raster layer, including count, sum, mean, median, and more. Add new columns to the polygon layer with a customizable prefix.
Instructions
Per-polygon stats from a raster (native:zonalstatisticsfb). stats int codes: 0=count 1=sum 2=mean 3=median 4=stdev 5=min 6=max 7=range 8=minority 9=majority 10=variety 11=variance (default [0,1,2]). New columns prefixed by 'prefix'. No output_path = in-memory layer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"polygon_layer": "<polygon_layer>",
"raster_layer": "<raster_layer>"
},
"name": "zonal_statistics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| band | No | ||
| stats | No | ||
| prefix | No | _ | |
| output_path | No | ||
| raster_layer | Yes | ||
| polygon_layer | Yes |