|
# Zonal Statistics
|
|
|
|
Calculate statistics for raster data within polygon zones.
|
|
|
|
## Overview
|
|
|
|
Zonal statistics calculates summary statistics (mean, sum, count, etc.) for raster pixel values within polygon zones.
|
|
|
|
## Inputs
|
|
|
|
- **Raster Dataset**: Raster dataset to analyze
|
|
- **Zone Dataset**: Polygon dataset defining zones
|
|
- **Statistics**: Statistics to calculate
|
|
|
|
## Outputs
|
|
|
|
New dataset containing:
|
|
|
|
- Zone polygons
|
|
- Raster statistics for each zone
|
|
- Zone attributes
|
|
|
|
## Statistics
|
|
|
|
- **Mean**: Average pixel value
|
|
- **Sum**: Sum of pixel values
|
|
- **Count**: Number of pixels
|
|
- **Min/Max**: Minimum/maximum pixel values
|
|
- **StdDev**: Standard deviation of pixel values
|
|
|
|
## Example
|
|
|
|
```json
|
|
{
|
|
"raster_dataset_id": 125,
|
|
"zone_dataset_id": 123,
|
|
"statistics": ["mean", "sum", "count"]
|
|
}
|
|
```
|
|
|
|
## Background Jobs
|
|
|
|
This analysis runs as a background job.
|
|
|
|
## Use Cases
|
|
|
|
- Land cover analysis
|
|
- Elevation statistics
|
|
- Climate data aggregation
|
|
- Raster value extraction
|
|
|
|
## Notes
|
|
|
|
- Zones must overlap raster extent
|
|
- Statistics calculated for overlapping pixels
|
|
- NoData values excluded
|
|
- Processing time depends on raster and zone sizes
|
|
|
|
## Related Documentation
|
|
|
|
- [Analysis API](../api/analysis.md)
|
|
- [Raster Tools](raster.md)
|
|
|