Python geospatial libraries

Updated Nov 2026

Python geospatial libraries read, analyze, and transform data tied to locations on Earth, such as points, boundaries, and satellite images. Vector data stores each shape as coordinates rather than as the grid of cell values that raster data uses. These libraries let mapping apps, logistics tools, and AI agents answer questions about places and distances.

Popularity

Shapely has the most monthly downloads in this comparison, at 78.4M.

LibraryMonthly downloadsStarsLast releaseLicense
Shapely
78.4M
4.5KOct 2026BSD-3-Clause
pyproj
26.3M
1.2KSep 2026MIT
h3-py
14.8M
Not on GitHubNov 2026Apache-2.0
GeoPandas
14.8M
5.3KSep 2026BSD-3-Clause
Pyogrio
14.2M
Not on GitHubJun 2026MIT
Rtree
12.2M
Not on GitHubAug 2025MIT
geopy
12.1M
Not on GitHubJul 2026MIT
Rasterio
7.4M
2.6KSep 2026BSD-3-Clause
Downloads: pypi, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Features compared

LibraryVector dataset I/ORaster dataset I/ONative CRS transformationsGeometry predicates or buffersSpatial indexingEllipsoidal geodesic distances
ShapelyUnsupportedUnsupportedUnsupportedBuilt-inBuilt-inUnsupported
pyprojUnsupportedUnsupportedBuilt-inUnsupportedUnsupportedBuilt-in
h3-pyUnsupportedUnsupportedUnsupportedUnsupportedBuilt-inUnsupported
GeoPandasBuilt-inUnsupportedBuilt-inBuilt-inBuilt-inUnsupported
PyogrioBuilt-inUnsupportedUnsupportedUnsupportedUnsupportedUnsupported
RtreeUnsupportedUnsupportedUnsupportedUnsupportedBuilt-inUnsupported
geopyUnsupportedUnsupportedUnsupportedUnsupportedUnsupportedBuilt-in
RasterioUnsupportedBuilt-inBuilt-inUnsupportedUnsupportedUnsupported
Built-inNot supported

Libraries and code examples

Manipulates and analyzes geometric objects in a Cartesian plane.

Downloads / mo
78.4M
Stars
4.5K
Last release
2.2.0
License
BSD-3-Clause

Strengths

  • Combines and intersects shapes. Use union and intersection for operations on individual geometries.
  • Processes arrays of geometries. Apply vectorized functions to geometry arrays.

Limitations

  • Geometric analysis ignores height. Use another approach when height must affect geometric measurements.
  • CRS conversion needs another engine. Use PyProj when converting between coordinate reference systems.

Quickstart

From README.rst
$ python -m pip install shapely==2.2.0
from shapely import Point

point = Point(0, 0)
buffer = point.buffer(1)

Shapely examples

From open-source projects on GitHub

Provides Python access to PROJ for coordinate transformations and projection definitions.

Downloads / mo
26.3M
Stars
1.2K
Last release
3.8.0
License
MIT

Strengths

  • Transforms between coordinate systems. Use Transformer for coordinate and datum conversions.
  • Accepts coordinate arrays. Transform batches of coordinate values through the same API.

Limitations

  • Axis order can change. Use always_xy when the caller supplies longitude before latitude.
  • Transformation grids are installed separately. Install required grids when a chosen datum conversion needs them.

Quickstart

From examples.html
$ python -m pip install pyproj==3.8.0
from pyproj import Transformer

transformer = Transformer.from_crs(4326, 3857, always_xy=True)
x, y = transformer.transform(-75, 40)

pyproj examples

From open-source projects on GitHub

Indexes locations with the Uber hierarchical hexagonal geospatial indexing system.

Downloads / mo
14.8M
Last release
4.5.1
License
Apache-2.0

Quickstart

From api_quick.html
$ python -m pip install h3==4.5.1
import h3

cell = h3.latlng_to_cell(37.77, -122.42, 9)

h3-py examples

From open-source projects on GitHub

Extends pandas with geometry columns, spatial operations, and geospatial file handling.

Downloads / mo
14.8M
Stars
5.3K
Last release
1.2.0
License
BSD-3-Clause

Strengths

  • Combines geometry with table columns. Retain attributes from both tables when overlaying spatial datasets.
  • Reprojects geometry columns. Use to_crs to transform the active geometry column.

Limitations

  • Dateline crossings distort reprojection. Check geometries that cross the dateline or other projection boundaries.
$ python -m pip install geopandas==1.2.0
import geopandas as gpd
from shapely import Point

points = gpd.GeoSeries([Point(-75, 40)], crs="EPSG:4326")
projected = points.to_crs("EPSG:3857")

GeoPandas examples

From open-source projects on GitHub

Reads and writes spatial vector file formats in vectorized form through GDAL and OGR.

Downloads / mo
14.2M
Last release
0.13.0
License
MIT

Quickstart

From api.html
$ python -m pip install pyogrio==0.13.0
import pyogrio

drivers = pyogrio.list_drivers()

Pyogrio examples

From open-source projects on GitHub

Provides an R-tree spatial index for Python GIS.

Downloads / mo
12.2M
Last release
1.4.1
License
MIT

Quickstart

From tutorial.html
$ python -m pip install rtree==1.4.1
from rtree import index

spatial_index = index.Index()
spatial_index.insert(0, (0, 0, 1, 1))
matches = list(spatial_index.intersection((0.5, 0.5, 2, 2)))

Rtree examples

From open-source projects on GitHub

Provides a geocoding toolbox for Python.

Downloads / mo
12.1M
Last release
2.5.0
License
MIT

Quickstart

From index.html
$ python -m pip install geopy==2.5.0
from geopy.distance import geodesic

distance_km = geodesic((41.49, -71.31), (41.5, -81.69)).km

geopy examples

From open-source projects on GitHub

Reads and writes geospatial raster datasets through NumPy-based Python APIs.

Downloads / mo
7.4M
Stars
2.6K
Last release
1.5.2
License
BSD-3-Clause

Strengths

  • Works directly with raster arrays. Read and write pixel bands as array data.
  • Reprojects raster grids. Use reproject to map arrays into another geospatial grid.

Limitations

  • Writing support varies by driver. Use GeoTIFF for the best-supported writing path.

Quickstart

From quickstart.html
$ python -m pip install rasterio==1.5.2
import rasterio

with rasterio.open("example.tif") as dataset:
    band = dataset.read(1)

Rasterio examples

From open-source projects on GitHub

FAQ

GeoPandas suits most vector analysis, with geometry columns on a pandas DataFrame. Shapely suits operations on individual geometries. Rasterio suits satellite images and other raster datasets.

GeoPandas extends pandas with geometry columns, spatial operations, and reading and writing of geospatial files.

Shapely manipulates and analyzes geometric objects such as points, lines, and polygons in a Cartesian plane. pyproj handles transformations between coordinate systems.

geopy is a geocoding toolbox that turns addresses into coordinates and coordinates into addresses through outside geocoding services.

Rasterio reads and writes geospatial raster datasets as NumPy arrays.

For coding agents

Found your geospatial library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official