GisForWeb
Menu
All tools
r

rasterstats

Open Source

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

License

BSD-3-Clause

About

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.

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

Screenshot

rasterstats screenshot

Details

Type
Library
Pricing
open-source

Platforms

web
linux
macos
windows

Languages

Python

Data formats

GeoTIFF
COG
GeoJSON
Shapefile