Zonal Statistics
zonal_statisticsCalculate per-polygon raster statistics (count, sum, mean, median, etc.) with customizable stats codes and output prefix. Specify polygon and raster layers to generate new columns.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| band | No | ||
| stats | No | ||
| prefix | No | _ | |
| output_path | No | ||
| raster_layer | Yes | ||
| polygon_layer | Yes |