zonal_statistics
Compute raster statistics within polygons to analyze spatial data. Input raster and vector files to calculate metrics like mean, min, max, and std per polygon. Returns detailed results for geospatial analysis.
Instructions
Calculate statistics of raster values within polygons (zonal statistics).
Args:
raster_path: Path to the raster file.
vector_path: Path to the vector file (polygons).
stats: List of statistics to compute (e.g., ["mean", "min", "max", "std"]).
Returns:
Dictionary with status, message, and statistics per polygon.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
raster_path | Yes | ||
stats | No | ||
vector_path | Yes |
Input Schema (JSON Schema)
{
"properties": {
"raster_path": {
"title": "Raster Path",
"type": "string"
},
"stats": {
"default": null,
"items": {},
"title": "Stats",
"type": "array"
},
"vector_path": {
"title": "Vector Path",
"type": "string"
}
},
"required": [
"raster_path",
"vector_path"
],
"title": "zonal_statisticsArguments",
"type": "object"
}