A Practical Guide to Zonal Statistics in Remote Sensing
A satellite image is a grid of pixel values covering an area that rarely matches the boundary you actually care about — a district, a farm plot, a protected area. Zonal statistics is the operation that bridges the two: summarizing every pixel that falls within a given polygon into a small set of representative numbers.
Beyond the Mean
The mean is the most commonly reported zonal statistic, but on its own it can hide a lot. A district with a mean NDVI of 0.4 could be uniformly moderate vegetation everywhere, or it could be half dense forest and half bare urban core averaging out to the same number. That's what the other statistics are for:
- Standard deviation — how much the value varies within the zone. A high standard deviation is itself informative: it tells you the zone is heterogeneous, and a single mean is a weaker summary of it.
- Min / max — the extremes present in the zone, useful for spotting outlier conditions a mean would smooth over entirely.
- Sum — meaningful for count-like variables (e.g. estimated population) where you want a total, not an average.
- Confidence interval — an estimate of how precise the mean itself is, given the pixel count. Worth treating carefully: pixels within a boundary are spatially autocorrelated (a hot pixel's neighbor is usually also hot), so a naive standard-error-based interval tends to be narrower than the true uncertainty [1].
A Common Mistake: Ignoring Scale
Zonal statistics computed at too coarse a resolution can average away exactly the variation you're trying to measure — a small but genuinely hot industrial zone can disappear into a much larger district-level mean if the pixel size is large relative to the feature [2]. Matching the raster's native resolution and the size of your zones is worth checking before drawing conclusions from a single mean value.
Batch Processing Multiple Zones
When comparing many boundaries at once (all districts in a state, for instance), it also becomes possible to ask a relative question: is this particular zone's mean unusually high or low compared to the others in the same batch — which is the logic behind relative metrics like UHI Intensity, distinct from each zone's raw statistics considered in isolation.
References
- Cressie, N. (1993). Statistics for Spatial Data (Revised ed.). John Wiley & Sons.
- Openshaw, S. (1984). The Modifiable Areal Unit Problem. CATMOG 38, GeoBooks, Norwich.
Run batch zonal statistics across dozens of boundaries at once
Compute mean, standard deviation, min/max, and per-land-cover-class statistics across every district in a state in a single server-side call — no code required.
Try it now →