# rasterstats

Canonical: https://gisforweb.com/tools/rasterstats/

Summarize raster data over vector zones, with Python API and rio CLI subcommands.

rasterstats computes summary statistics of raster bands over vector geometries, such as the mean elevation of each polygon in a DEM. It also provides interpolated point queries for rasters that have no zonal statistics of their own, and ships as rio CLI subcommands that pipe GeoJSON between tools. Statistics are computed with Rasterio and GDAL.

## Details

- Type: library

- Categories: analysis, raster

- Open source: Yes

- Pricing model: open-source

- License: BSD-3-Clause

- Platforms: web, linux, macos, windows

## Features

- Zonal statistics of raster bands over vector geometries

- Interpolated point queries where bands lack statistics

- rio zonalstats and rio pointquery CLI subcommands

- GeoJSON input and output for shell pipelines

- User-defined statistics via custom callbacks

- Handles categorical rasters and mini-rasters

## Project sources

- Website: https://pythonhosted.org/rasterstats/

- Documentation: https://pythonhosted.org/rasterstats/manual.html

- Repository: https://github.com/perrygeo/python-rasterstats

Directory descriptions are summaries. Verify current capabilities and terms with the project sources.
