pygeos
GEOS wrapped in numpy ufuncs
What it is and what it does
PyGEOS is a C/Python library that wraps the open-source GEOS geometry engine to provide NumPy ufuncs for geometric operations. Instead of looping over geometries in Python, PyGEOS performs bulk operations on arrays of geometries with the GIL released, enabling parallel computation and significant performance gains for spatial workflows.
The package is designed for developers working with large collections of geometric objects—points, polygons, lines—who need to compute containment, intersection, area, and other topological properties at scale. It integrates directly with NumPy's broadcasting semantics, so operations on geometry arrays feel natural to users familiar with array-oriented Python. However, PyGEOS development was merged into Shapely in December 2021, and active maintenance has shifted to the Shapely repository; PyGEOS 0.14 is the final standalone release, with only backports expected.
Use it for:
- Batch spatial queries: test whether thousands of points fall within a polygon without explicit Python loops.
- Intersection analysis: compute areas of all pairwise intersections between two lists of polygons efficiently.
- Geospatial data pipelines: filter or transform large GeoDataFrames by geometric predicates using vectorized operations.
- Multithreaded geometry processing: leverage multiple CPU cores to parallelize GEOS computations from a single Python process.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyGEOS wraps GEOS geometry operations in NumPy ufuncs to perform vectorized geometric calculations on arrays of geometries with C-level performance and multithreading support.
Yes, if you need high-performance vectorized geometry operations on arrays and are comfortable with a dormant package. PyGEOS 0.14 is stable and receives no known vulnerabilities, but new projects should prefer Shapely 2.0, which incorporates PyGEOS's vectorization natively. Install PyGEOS only if you have an existing codebase relying on it or require its specific API; for new work, Shapely 2.0 is the maintained path forward.
Install
pygeos on PyPI
pip
pip install pygeosuv
uv add pygeospoetry
poetry add pygeosInstalling pygeos
Before you install
Medium install friction due to compiled C extensions; wheels are available for Python 3.7–3.11 on macOS, Windows, and Linux. The package is dormant—last release was December 2022 and last commit September 2024—but the project was intentionally merged into Shapely 2.0, so active development has moved upstream.
License in practice
BSD 3-Clause is permissive; you may use, modify, and distribute PyGEOS freely in commercial and private projects. GEOS itself is licensed under LGPL 2.1, which does not impose additional restrictions on PyGEOS's BSD wrapper.
Quickstart
import numpy as np
from pygeos import box, contains, points
geoms = points(*np.indices((4, 4)))
polygon = box(0, 0, 2, 2)
result = contains(polygon, geoms)
Requires a C compiler and GEOS library at build time; prebuilt wheels are available for common platforms. NumPy must be installed as a runtime dependency.
Verify before relying
- Whether PyGEOS 0.14 receives backports from Shapely 2.0 or is truly unmaintained after December 2022.
- Performance characteristics compared to Shapely 2.0's native vectorized operations.
- Compatibility with recent GEOS versions and whether binary wheels will be rebuilt for newer Python releases.
Package facts
| License | BSD 3-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | dormant — 1,341 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 149,545/month — #10,991 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pygeos-0.14-cp310-cp310-macosx_10_9_universal2.whl; pygeos-0.14-cp310-cp310-macosx_10_9_x86_64.whl; pygeos-0.14-cp310-cp310-macosx_11_0_arm64.whl; pygeos-0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pygeos-0.14-cp310-cp310-win32.whl; pygeos-0.14-cp310-cp310-win_amd64.whl; pygeos-0.14-cp311-cp311-macosx_10_9_universal2.whl; pygeos-0.14-cp311-cp311-macosx_10_9_x86_64.whl; pygeos-0.14-cp311-cp311-macosx_11_0_arm64.whl; pygeos-0.14-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl; pygeos-0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pygeos-0.14-cp311-cp311-win32.whl; pygeos-0.14-cp311-cp311-win_amd64.whl; pygeos-0.14-cp37-cp37m-macosx_10_9_x86_64.whl; pygeos-0.14-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl; pygeos-0.14-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pygeos-0.14-cp37-cp37m-win32.whl; pygeos-0.14-cp37-cp37m-win_amd64.whl; pygeos-0.14-cp38-cp38-macosx_10_9_universal2.whl; pygeos-0.14-cp38-cp38-macosx_10_9_x86_64.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
shapelyShapely provides Python tools for creating,…
permissive · top 1,000 on PyPI
pygeoifPyGeoIf provides lightweight, pure-Python…
copyleft · top 15,000 on PyPI
geopandasGeoPandas extends pandas DataFrames to handle…
permissive · top 1,000 on PyPI
gswGSW-Python wraps the TEOS-10 seawater…
permissive · top 15,000 on PyPI
odc-geoProvides projection-aware geometry classes…
permissive · top 15,000 on PyPI
dask-geopandasDask-GeoPandas parallelizes geospatial…
permissive · top 15,000 on PyPI
descartesConverts geometric objects and GeoJSON-like…
permissive · top 15,000 on PyPI
s2spheres2sphere provides Python bindings to work with…
permissive · top 15,000 on PyPI
reprojReproject shapely geometries between coordinate…
permissive · top 15,000 on PyPI
geojsonEncodes, decodes, and represents GeoJSON…
permissive · top 5,000 on PyPI