shapely
Manipulation and analysis of geometric objects
Decision gist · record as of 2026-08-14
Yes. Shapely is production-stable and widely used (top 1000 PyPI), with active maintenance, no known vulnerabilities, and permissive BSD 3-Clause licensing. Install friction is medium due to compiled dependencies, but pre-built wheels eliminate most friction. Use it if you need 2D geometric operations; avoid it only if your use case is purely coordinate-system or data-format focused.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10 and GEOS >=3.9; pre-built wheels handle GEOS, but some platforms may require system libraries.
- Medium install friction due to compiled GEOS dependency, but pre-built wheels cover all major platforms and Python versions (3.10–3.14).
- Repository is active with recent commits; last release was 324 days ago.
License · maintenance · safety
BSD 3-Clause (permissive) — BSD 3-Clause permissive license allows commercial and private use with minimal restrictions. GEOS itself is LGPL 2.1, which does not impose additional constraints on Shapely's BSD-licensed wrapper.
last release 2025-09-24 (324 days) · last repo commit 2026-08-12 · 4,489 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 85,768,804 downloads/mo, #395 on PyPI
Alternatives
Verify before relying
pip install shapely
from shapely import Point
patch = Point(0.0, 0.0).buffer(10.0)
print(patch.area)- Performance characteristics of vectorized ufuncs vs. scalar operations on large geometry arrays.
- Specific GEOS version bundled in wheels and any known compatibility gaps.
- GIL-release behavior and multithreading scalability in real-world workloads.
- Monthly download volume and adoption metrics beyond popularity tier ranking.
What it is and what it does
Shapely is a mature Python library for working with 2D geometric shapes—points, lines, polygons, and their combinations—in the Cartesian plane. It wraps the GEOS geometry engine (the same library powering PostGIS) and exposes both a high-level scalar Geometry interface for individual shapes and NumPy ufuncs for batch operations on arrays of geometries. The library handles geometric predicates (containment, intersection, overlap), transformations (buffering, simplification, rotation), and measurements (area, length, distance) with GIL-release support for multithreaded workloads.
Shapely is not a data serialization or coordinate-system library—it focuses on geometric computation—but it integrates readily with WKT, WKB, and GeoJSON formats for interchange with other GIS tools. It requires Python >=3.10, NumPy >=1.21, and GEOS >=3.9, and is distributed as pre-built wheels for macOS, Linux, Windows, and ARM platforms.
Use it for
- Compute spatial relationships (containment, intersection, overlap) between geographic features in batch operations.
- Build geometric buffers, simplifications, and transformations for map-based applications or spatial analysis.
- Validate and repair polygon topology in GIS workflows before serialization to PostGIS or other backends.
- Integrate geometric operations into data pipelines using NumPy arrays for performance-critical geospatial tasks.
- Convert between WKT, WKB, and GeoJSON representations for interoperability with other mapping libraries.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Shapely is production-stable and widely used (top 1000 PyPI), with active maintenance, no known vulnerabilities, and permissive BSD 3-Clause licensing. Install friction is medium due to compiled dependencies, but pre-built wheels eliminate most friction. Use it if you need 2D geometric operations; avoid it only if your use case is purely coordinate-system or data-format focused.
Install
shapely on PyPI
Before you install
Medium install friction due to compiled GEOS dependency, but pre-built wheels cover all major platforms and Python versions (3.10–3.14). Repository is active with recent commits; last release was 324 days ago.
Requires Python >=3.10 and GEOS >=3.9; pre-built wheels handle GEOS, but some platforms may require system libraries.
License in practice
BSD 3-Clause permissive license allows commercial and private use with minimal restrictions. GEOS itself is LGPL 2.1, which does not impose additional constraints on Shapely's BSD-licensed wrapper.
Quickstart
pip install shapely
from shapely import Point
patch = Point(0.0, 0.0).buffer(10.0)
print(patch.area)
Verify before relying
- Performance characteristics of vectorized ufuncs vs. scalar operations on large geometry arrays.
- Specific GEOS version bundled in wheels and any known compatibility gaps.
- GIL-release behavior and multithreading scalability in real-world workloads.
- Monthly download volume and adoption metrics beyond popularity tier ranking.
Package facts
| License | BSD 3-Clause permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 324 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,768,804 / month, #395 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: GIS |
Evidence: shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl; shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl; shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl; shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl; shapely-2.1.2-cp310-cp310-win32.whl; shapely-2.1.2-cp310-cp310-win_amd64.whl; shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl; shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl; shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl; shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl; shapely-2.1.2-cp311-cp311-win32.whl; shapely-2.1.2-cp311-cp311-win_amd64.whl; shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl; shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl; shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “2d geometry manipulation python”
- shapelyShapely provides Python tools for creating, manipulating, and…
- bermudaProvides Rust-accelerated triangulation functions for 2D paths and…
- euclid3Provides 2D and 3D vector, matrix, quaternion, and geometry math…
Give your agent the search over MCP, or paste the wish link into any chat.
More GIS packages
pyproj provides a Python interface to PROJ, enabling cartographic projections and coordinate system transformations for geospatial applications.
GeoPandas extends pandas DataFrames to handle geographic data, combining pandas operations with shapely geometry and spatial analysis capabilities that would otherwise require a spatial database.
Install it if you work with geographic data in Python and want to avoid setting up a spatial database or learning a separate GIS tool.
geopy is a Python client for geocoding and distance calculation that converts addresses to coordinates and vice versa using multiple web-based geocoding services, and computes geodesic and great-circle distances between geographic points.
Install it if you need geocoding or distance calculations in your application.
Pyogrio provides fast, bulk-oriented read and write access to vector spatial data formats (Shapefile, GeoPackage, GeoJSON, etc.) via GDAL/OGR bindings, typically for use with GeoPandas GeoDataFrames.
h3 provides Python bindings to Uber's H3 geospatial indexing library, converting geographic coordinates into hierarchical hexagonal grid cells and performing spatial operations on them.
Fiona reads and writes vector GIS data (Shapefile, GeoPackage, etc.) via a Python API and command-line interface, wrapping GDAL with a focus on readable, productive code.
See also antimeridian · descartes · pygeos · shapely-polyskel · rhino3dm · pygeoif · vector · reproj · odc-geo