Packages
Shapely provides Python tools for creating, manipulating, and analyzing 2D geometric objects (points, lines, polygons) using the GEOS library, with both scalar and vectorized NumPy-based operations.
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.
Rtree wraps libspatialindex to provide spatial indexing for Python, enabling nearest-neighbor search, intersection queries, and multi-dimensional spatial data structures.
Rasterio reads and writes geospatial raster data in formats like GeoTIFF, providing a Python API based on N-D arrays for working with gridded datasets.
Converts between GeoJSON, WKT/WKB, Extended WKT/WKB, GeoPackage Binary, and EsriJSON formats for 2D, 3D, and 4D geometries without requiring compiled dependencies.
PyShp reads and writes ESRI Shapefiles in pure Python, supporting geometry and attribute data in the standard GIS vector format without external dependencies.
Install it if you work with shapefiles in data pipelines, GIS automation, or geospatial analysis.
folium builds interactive web maps by combining Python data manipulation with Leaflet.js, letting you create and customize maps programmatically and render them as HTML.
Affine provides a Python class for representing and manipulating 2D affine transformation matrices, with support for translation, rotation, scaling, and shearing operations.
Install it if you work with georeferenced rasters, need to compose 2D transformations, or integrate with GDAL-based tools.
Cartopy makes it easy to draw maps for data analysis and visualization by providing object-oriented projection definitions, point/line/polygon transformations between map projections, and Matplotlib integration for advanced mapping.
Install it if you need to visualize geographic or geospatial data in Python.
GeoAlchemy2 extends SQLAlchemy to work with spatial databases, providing an ORM layer for geographic data types and operations.
Install it if you need to work with geographic data in a SQLAlchemy-based application.
Converts geographic coordinates (longitude/latitude) to timezone names using simplified polygon data, with optional GeoJSON export for visualization.
Encodes, decodes, and represents GeoJSON formatted geographic data through Python classes for all GeoJSON object types and implements the __geo_interface__ specification.
Install it if you need to work with GeoJSON in a Python application.
Calculates great-circle distances between geographic coordinates on Earth using the haversine formula, supporting multiple distance units and optional vector operations.
Install it if you need to calculate distances between geographic coordinates; skip it only if you require more advanced geodetic calculations or are already using a…
Geocoder provides a unified Python interface to multiple online geocoding services, converting addresses to coordinates and vice versa without requiring you to handle each provider's different API schemas.
Mercantile converts between geographic coordinates, Web Mercator tiles (XYZ), and quadkeys, and provides utilities to navigate tile hierarchies and generate GeoJSON tile shapes.
Install it if you're working with tile-based maps or need to convert between geographic and tile coordinate systems.
Laspy reads, modifies, and writes LAS and LAZ LiDAR point cloud files, with support for streamed/chunked processing, COPC format, and optional CRS transformation via pyproj.
Install it if you work with LiDAR data or ASPRS point cloud formats.
rioxarray extends xarray with geospatial and raster operations powered by rasterio, enabling you to work with georeferenced gridded data using familiar xarray syntax.
Provides unit-aware measurement objects for Python that support conversion between different units and arithmetic operations across multiple measurement types including distance, weight, temperature, energy, speed, volume, time, and area.
Provides Pydantic models that validate and serialize GeoJSON data according to RFC 7946 specification.
Converts between latitude/longitude coordinates and Universal Transverse Mercator (UTM) grid references in both directions, with support for NumPy arrays.
Mapclassify implements classification schemes for choropleth maps, determining the optimal number of classes and assigning observations to them for use with geovisualization packages.
Install it if you are building choropleth maps and need to classify continuous spatial data into discrete color classes.
OSMnx downloads, models, and analyzes street networks and geospatial features from OpenStreetMap, letting you work with walking, driving, or biking networks, amenities, building footprints, and routing data.
Install it if you need to work with street networks, urban amenities, or geospatial features from OpenStreetMap.
Converts between geographic and 3-D coordinate systems (geodetic, ECEF, ENU, NED, AER, ECI) with pure Python and optional NumPy acceleration, following Matlab Mapping Toolbox conventions.
Converts geometric objects and GeoJSON-like data into matplotlib patches and paths for visualization on plots.
Construct and work with map tile grids following the OGC TileMatrixSet specification, supporting Web Mercator and many other coordinate reference systems beyond the standard Web Mercator grid.
Install it if you need to work with map tiles in coordinate systems other than Web Mercator, or if you're building OGC-compliant geospatial services.
Python client library for Google Earth Engine, enabling programmatic access to satellite imagery and geospatial datasets for remote sensing and environmental analysis.
The main gotcha is that authentication and an Earth Engine project are prerequisites; also, dynamic class loading means you'll rely on the official API Reference.
Countryinfo provides a Python interface to query comprehensive geographic and administrative data for any country, including ISO codes, capitals, currencies, languages, borders, and GeoJSON boundaries.
Install it if you need to work with country codes, geographic data, or reference information in a Python application.
Simplekml generates KML (Keyhole Markup Language) files for geographic data visualization with minimal code, supporting basic elements like points, lines, polygons, folders, and documents.
However, its abandoned status (no updates since 2021) means it will not adapt to future KML standard changes or Python version incompatibilities.
PySTAC Client is a Python library for querying and working with SpatioTemporal Asset Catalog (STAC) APIs, enabling programmatic search and retrieval of geospatial imagery and raster data.
Install it if you need to search or access geospatial imagery from STAC-compliant services.
libpysal provides core spatial analysis building blocks—computational geometry, spatial weights matrices, graph representations, and example datasets—that underpin the broader PySAL ecosystem.
Not necessary as a standalone tool for general users; install only if spatial weights, computational geometry, or PySAL integration is part of your project.
Computes numerical derivatives, gradients, Jacobians, Hessians, and higher-order partial derivatives of scalar and vector functions using adaptive finite differences and Richardson extrapolation.
PyGeodesy provides pure Python implementations of geodetic calculations for ellipsoidal and spherical earth models, including distance, bearing, coordinate conversions, and geometric operations on geographic points.
Rasterstats computes summary statistics (mean, min, max, count) from raster datasets for vector geometries, and queries raster values at point locations.
rio-cogeo creates and validates Cloud Optimized GeoTIFFs (COGs) as a Rasterio plugin, adding internal overviews and tiled structure to geospatial raster files for efficient cloud storage and access.
GDAL provides Python bindings to read, write, and manipulate geospatial raster and vector data through a C++ abstraction layer.
Install it if you need to work with raster or vector geospatial data.