exactextract
Fast and accurate raster zonal statistics
What it is and what it does
exactextract is a Python wrapper around a C++ library for computing zonal statistics—the task of summarizing raster pixel values that fall within polygon boundaries. It is commonly used in geospatial analysis to aggregate satellite imagery, digital elevation models, or other gridded data by administrative regions, study areas, or other polygon features. The package depends only on numpy and is available as precompiled wheels for modern Python versions (3.9–3.13) across macOS, Windows, and Linux, making installation straightforward on most systems.
The core use case is fast, accurate extraction of statistics (mean, sum, count, etc.) from raster cells that intersect with polygon geometries. Because it is implemented in C++, it is designed to handle large rasters and many polygons efficiently. The package is actively maintained, with no known security vulnerabilities, and is licensed under Apache 2.0, permitting commercial and private use.
Use it for:
- Aggregate satellite imagery (NDVI, temperature, precipitation) by administrative boundaries or study polygons.
- Extract elevation statistics (mean, min, max) from digital elevation models within watershed or land-parcel polygons.
- Summarize land-cover classification rasters by region to compute area fractions or dominant class per polygon.
- Compute zonal means or sums of climate or environmental grids for spatial analysis and modeling.
- Batch process large raster datasets with many polygons where performance and accuracy are critical.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
exactextract computes zonal statistics—fast summaries of raster values within polygon boundaries—using a C++ implementation exposed to Python with numpy arrays.
Yes. exactextract is a specialized, actively maintained tool for a well-defined geospatial task. It has no known vulnerabilities, a permissive license, minimal dependencies (numpy only), and precompiled wheels for all common platforms and Python versions. Install it if you need fast, accurate zonal statistics; skip it if your workflow uses simpler raster operations or if you are not working with polygon-raster overlays.
Install
exactextract on PyPI
pip
pip install exactextractuv
uv add exactextractpoetry
poetry add exactextractInstalling exactextract
Before you install
Medium friction: precompiled wheels available for Python 3.9–3.13 on macOS (arm64, x86_64), Windows (32-bit, 64-bit, arm64), and Linux (manylinux). Last release 256 days ago; repository active with recent commits.
License in practice
Apache License 2.0 is permissive: you may use, modify, and distribute the package freely in commercial or private projects, provided you include a copy of the license and note any changes you make.
Quickstart
import exactextract
import numpy as np
# Requires raster data (e.g., from rasterio) and polygon geometry
# exactextract.exact_extract(raster, polygons, operations=['mean', 'sum'])
Requires raster and polygon data in a compatible format (typically from rasterio, geopandas, or similar geospatial libraries); the package itself handles numpy arrays but does not provide data loading.
Verify before relying
- Specific raster formats and polygon geometry types supported by the package API.
- Whether the package includes command-line interface bindings in the Python distribution.
- Performance benchmarks or accuracy claims compared to alternative zonal statistics implementations.
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | actively maintained — 256 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 183,511/month — #10,065 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: exactextract-0.3.0-cp310-cp310-macosx_11_0_arm64.whl; exactextract-0.3.0-cp310-cp310-macosx_11_0_x86_64.whl; exactextract-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; exactextract-0.3.0-cp310-cp310-win32.whl; exactextract-0.3.0-cp310-cp310-win_amd64.whl; exactextract-0.3.0-cp310-cp310-win_arm64.whl; exactextract-0.3.0-cp311-cp311-macosx_11_0_arm64.whl; exactextract-0.3.0-cp311-cp311-macosx_11_0_x86_64.whl; exactextract-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; exactextract-0.3.0-cp311-cp311-win32.whl; exactextract-0.3.0-cp311-cp311-win_amd64.whl; exactextract-0.3.0-cp311-cp311-win_arm64.whl; exactextract-0.3.0-cp312-cp312-macosx_11_0_arm64.whl; exactextract-0.3.0-cp312-cp312-macosx_11_0_x86_64.whl; exactextract-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; exactextract-0.3.0-cp312-cp312-win32.whl; exactextract-0.3.0-cp312-cp312-win_amd64.whl; exactextract-0.3.0-cp312-cp312-win_arm64.whl; exactextract-0.3.0-cp313-cp313-macosx_11_0_arm64.whl; exactextract-0.3.0-cp313-cp313-macosx_11_0_x86_64.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
rasterstatsRasterstats computes summary statistics (mean,…
permissive · top 15,000 on PyPI
rasterixRasterix provides tools for analyzing raster…
permissive · top 15,000 on PyPI
pystac-ext-rasterExtends PySTAC with the Raster Extension…
permissive · top 5,000 on PyPI
rasterioRasterio reads and writes geospatial raster…
permissive · top 5,000 on PyPI
rioxarrayrioxarray extends xarray with geospatial and…
permissive · top 5,000 on PyPI
xarray-spatialxarray-spatial provides 150+ functions for…
permissive · top 15,000 on PyPI
pyclipperPyclipper performs polygon clipping operations…
permissive · top 5,000 on PyPI
runstatsComputes summary statistics (mean, variance,…
permissive · top 15,000 on PyPI
quadrilateral-fitterFits the smallest-area quadrilateral that…
permissive · top 15,000 on PyPI
esdaesda computes global and local spatial…
permissive · top 15,000 on PyPI