Registry / data / pygeos

pygeos

JSON →
library0.14pypypiunverified

PyGEOS provides GEOS (Geometry Engine - Open Source) operations wrapped in NumPy ufuncs for vectorized geospatial operations. Its development has ceased, and its core functionality has been merged into Shapely starting with version 2.0. The last release is 0.14, and no further major releases are expected as users are encouraged to migrate to Shapely 2.x.

pip install pygeos
INSTALL
IMPORT
SIG · PYGEOS
P
pygeos
datapythonv0.14
Install
3.9s avg
Import
—
Disk
99MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.14 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 3.65s
py 3.11
✕ build_error
✓ 3.5s
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 4.4s
99MB installed
● package 99MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pygeos
✓ import pygeos

Demonstrates creating basic geometry objects (points, polygon) and performing a vectorized spatial operation (intersects).

import pygeos # Create a single point point_a = pygeos.points(0, 0) # Create an array of points points_array = pygeos.points([ [1, 1], [2, 2], [3, 3] ]) # Create a polygon polygon = pygeos.polygons([(0, 0), (0, 4), (4, 4), (4, 0), (0, 0)]) # Perform a spatial operation: check intersection intersects = pygeos.intersects(polygon, points_array) print(f"Point A: {point_a}") print(f"Points array: {points_array}") print(f"Polygon: {polygon}") print(f"Intersects with polygon: {intersects}") # Expected: [True, True, True]
Debug
Known issues
breakingPyGEOS is officially deprecated as its core functionality has been merged into Shapely 2.0+. No new major features or releases are expected. New projects should use Shapely 2.x, and existing projects should plan to migrate.
fix
For new projects, use `shapely` (install `pip install shapely`). For existing projects, refer to the Shapely 2.0 migration guide for `pygeos` users (e.g., `shapely.from_pygeos()`, `shapely.to_pygeos()`).
affects: All versions, especially relevant since Shapely 2.0+
gotchaPyGEOS requires the GEOS C library (>= 3.5.0, preferably >= 3.6.0 for full features) to be installed on your system. `pip install pygeos` only installs the Python bindings, not the underlying C library. Failure to install GEOS will result in runtime errors.
fix
Install GEOS via your system's package manager (e.g., `sudo apt-get install libgeos-dev` on Ubuntu, `brew install geos` on macOS) or through a package manager like Conda (`conda install -c conda-forge pygeos`).
affects: All versions
gotchaPyGEOS objects are distinct from Shapely 1.x objects. Direct interoperation between them without explicit conversion methods (e.g., `pygeos.from_shapely`, `shapely.to_pygeos`) can lead to `TypeError` or unexpected behavior.
fix
Convert geometries between the libraries using `pygeos.from_shapely()` or `shapely.to_pygeos()` when necessary. For a unified approach, migrate to Shapely 2.x, which uses the same internal geometry representation.
affects: All versions when interoperating with Shapely < 2.0
gotchaOptimal performance in PyGEOS is achieved by leveraging its vectorized ufuncs, which expect NumPy arrays of geometries or coordinates as input. Iterating over scalar PyGEOS geometries in Python loops negates much of the performance benefit.
fix
Always pass NumPy arrays of geometries or coordinate arrays directly to `pygeos` functions for best performance. For example, `pygeos.area(geometry_array)` instead of `[pygeos.area(g) for g in geometry_list]`.
affects: All versions
Upgrade
Version history
0.14latest on PyPI · released Dec 12, 2022
Audit
Dependencies
numpyrequiredCore dependency for vectorized operations and ufuncs.
geosrequiredRequired GEOS C library (>= 3.5.0) for core geometry operations. Not a Python package, needs system installation.
Agent activity
9 hits · last 30 days
node
8
Resources
pygeos — pip install pygeos · libregistry