12+ Geospatial Extensions for PostgreSQL

PostGIS, H3, MobilityDB, pgrouting, and other Postgres extensions for geospatial data, mapping, and routing. Ranked by GitHub stars.

Last reviewed: May 15, 2026
12 extensions
1
pgrouting
1.4k+12 30d

pgRouting Extension

Geospatial·GPL-2.0·C++
2
mobilitydb
610+1 30d

MobilityDB geospatial trajectory data management & analysis platform

Geospatial·GPL-3.0·C
3
pointcloud
425+1 30d

data type for lidar point clouds

Geospatial·BSD-3-Clause·C
4
ogr_fdw
262+2 30d

foreign-data wrapper for GIS data access

Geospatial·MIT·C
5
q3c
900 30d

q3c sky indexing plugin

Geospatial·GPL-2.0·C
6
geoip
520 30d

IP-based geolocation query

Geospatial·BSD-2-Clause·SQL
7
pg_geohash
170 30d

Handle geohash based functionality for spatial coordinates

Geospatial·MIT·C
8
tzf
80 30d

Fast lookup timezone name by GPS coordinates

Geospatial·MIT·Rust
9

Fast Google Encoded Polyline encoding & decoding for postgres

Geospatial·MIT·Rust
10

H3 bindings for PostgreSQL

Geospatial·Apache-2.0·C
11

calculate great-circle distances on the surface of the Earth

Geospatial·PostgreSQL·C
12

PostGIS geometry and geography spatial types and functions

Geospatial·GPL-2.0·C

What is a PostgreSQL Geospatial Extension?

Geospatial extensions add geographic and spatial data types, indexes, and operators to Postgres. PostGIS is the foundational layer — adds geometry and geography types, R-tree (GiST) spatial indexes, OGC-standard ST_* functions for distance, intersection, containment, and area, plus raster support. Other extensions build on PostGIS or extend Postgres differently: H3 adds Uber's hexagonal hierarchical spatial index for fast spatial aggregation, MobilityDB adds trajectory and moving-object types for fleet and IoT data, and pgrouting adds graph-based shortest-path routing on top of PostGIS networks. Together they make Postgres a complete geospatial database — the open-source equivalent of Oracle Spatial or SQL Server Spatial.

When to Add a Geospatial Extension

Use PostGIS when you store or query anything tied to a location — points, polygons, lines, distances, intersections, contains-within queries, or geofencing. Routing problems (delivery dispatch, ride-sharing, network analysis) want pgrouting on top of PostGIS. Aggregating geospatial events at scale (rideshare heatmaps, IoT device positions) benefits from H3's hexagonal binning. Skip these and use a specialized GIS stack (CartoDB, MapServer-only) when you manage billions of geometries with complex topology operations across many users — for 99% of mapping, geofencing, and location-based service use cases, PostGIS is the answer.

Frequently Asked Questions

What is PostGIS?
PostGIS is the de-facto spatial extension for PostgreSQL — adds geometry and geography column types, spatial indexes (GiST, SP-GiST, BRIN), and ~300 ST_* functions implementing the OGC Simple Features standard. It's BSD-licensed, ~2k GitHub stars, used by NASA, OpenStreetMap, and most mapping platforms. PostGIS is mature (first released 2001) and supported by every major managed Postgres provider including AWS RDS, Aurora, Supabase, Neon, and Azure Database for PostgreSQL.
Do I need PostGIS or can I just use lat/long columns?
Plain lat/long columns work for storing locations and computing simple distances with the haversine formula. PostGIS becomes essential when you need: spatial indexes (queries like 'find all points within 5 km of X' run in milliseconds instead of full scans), polygon operations (geofencing, area calculations), projections (translating between coordinate systems), or anything beyond point-to-point math. The performance difference at scale is dramatic — a spatial GiST index turns a 10-second sequential scan into a 5ms indexed lookup.
How do I install PostGIS?
On managed services: PostGIS is pre-installed on RDS, Aurora, Supabase, Neon, and Azure — just run CREATE EXTENSION postgis; as a user with CREATE privilege. On self-hosted Postgres: install the OS package (e.g. apt install postgresql-17-postgis-3 or yum install postgis34_17), then run CREATE EXTENSION postgis; in the target database. Optional companion extensions: postgis_topology, postgis_raster, postgis_tiger_geocoder for US address geocoding.
Does PostGIS work on AWS RDS, Supabase, and Neon?
Every major managed provider supports PostGIS natively, no special config required. AWS RDS supports PostGIS on all current PostgreSQL versions (with raster support on RDS 13+). Aurora supports it identically. Supabase ships PostGIS enabled by default on every project. Neon includes PostGIS in their default extension list. Companion extensions like pgrouting and H3 have narrower support — check the provider's current extension allow-list for those.
What's the difference between PostGIS geometry and geography types?
geometry uses planar (Cartesian) coordinates — fast computation but inaccurate over long distances on Earth's curved surface. geography uses spherical coordinates and computes great-circle distances on the WGS84 ellipsoid — slightly slower but accurate for global data. Rule of thumb: use geography when your data spans countries or you care about real-world distances (e.g. delivery radius in km). Use geometry when data is in a single projected coordinate system (city, state, regional) and you've already projected the coordinates appropriately.

Manage PostgreSQL Visually

1bench is a modern GUI client for PostgreSQL — install extensions, write queries, and inspect schemas without leaving the IDE.

Try 1bench for PostgreSQL