postgis
PostGIS geometry and geography spatial types and functions
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 1500 | postgis | No | Yes | No | Yes | No | No | - |
| 1501 | postgis_topology | No | Yes | No | Yes | No | No | topology |
| 1502 | postgis_raster | No | Yes | No | Yes | No | No | - |
| 1503 | postgis_sfcgal | No | Yes | No | Yes | No | Yes | - |
| 1504 | postgis_tiger_geocoder | No | Yes | No | Yes | Yes | No | tiger |
| 1505 | address_standardizer | No | Yes | No | Yes | No | Yes | - |
| 1506 | address_standardizer_data_us | No | Yes | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 3.6.4 | 1817161514 | postgis | - |
| RPM | PGDG | 3.6.3 | 1817161514 | postgis36_$v | - |
| DEB | PGDG | 3.6.4 | 1817161514 | postgresql-$v-postgis-3 | - |
Install
You can install postgis directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
Source: Official manual, current manual HTML, release notes, patch release announcement
postgis adds spatial types, indexes, and SQL functions to PostgreSQL. The main user-facing split is between geometry for planar/projected work and geography for spherical calculations on longitude/latitude data.
Basic setup
Core types and functions
- constructors:
ST_MakePoint,ST_GeomFromText,ST_GeomFromGeoJSON - relationships:
ST_Intersects,ST_Contains,ST_Within,ST_DWithin - measurements and transforms:
ST_Distance,ST_Area,ST_Length,ST_Transform - processing:
ST_Buffer,ST_Intersection,ST_Union
Spatial indexes
The official manual continues to recommend GiST as the general-purpose spatial index, with BRIN and SP-GiST available for specific data distributions and tradeoffs.
Caveats
- Use
geometryin an appropriate projected SRID for planar distances and areas; usegeographywhen you need meter-based spheroidal calculations. PostGIS 3.6.3is a patch release dated 2026-04-14. The release notes describe fixes and a security hardening change, not a new stub-level usage surface, so this refresh mostly trims and aligns the stub with the current manual.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)