postgis
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
postgis | 3.6.3 | GIS | GPL-2.0 | C |
| 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.3 | 1817161514 | postgis | - |
| RPM | PGDG | 3.6.3 | 1817161514 | postgis36_$v | - |
| DEB | PGDG | 3.6.3 | 1817161514 | postgresql-$v-postgis-3 | - |
Install
You can install postgis directly. First, make sure the PGDG repository is added and enabled:
pig repo add pgdg -u # Add PGDG repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install postgis; # Install for current active PG version
pig ext install -y postgis -v 18 # PG 18
pig ext install -y postgis -v 17 # PG 17
pig ext install -y postgis -v 16 # PG 16
pig ext install -y postgis -v 15 # PG 15
pig ext install -y postgis -v 14 # PG 14
dnf install -y postgis36_18 # PG 18
dnf install -y postgis36_17 # PG 17
dnf install -y postgis36_16 # PG 16
dnf install -y postgis36_15 # PG 15
dnf install -y postgis36_14 # PG 14
apt install -y postgresql-18-postgis-3 # PG 18
apt install -y postgresql-17-postgis-3 # PG 17
apt install -y postgresql-16-postgis-3 # PG 16
apt install -y postgresql-15-postgis-3 # PG 15
apt install -y postgresql-14-postgis-3 # PG 14
Create Extension:
CREATE EXTENSION postgis;
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
CREATE EXTENSION postgis;
SELECT PostGIS_Full_Version();
Core types and functions
CREATE TABLE sensors (
id bigserial PRIMARY KEY,
geom geometry(Point, 4326),
geog geography(Point, 4326)
);
SELECT ST_SetSRID(ST_MakePoint(-73.985, 40.748), 4326);
SELECT ST_Intersects(a.geom, b.geom) FROM a, b;
SELECT ST_DWithin(a.geom, b.geom, 100);
SELECT ST_Distance(a.geog, b.geog);
SELECT ST_Transform(geom, 3857) FROM sensors;
- 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
CREATE INDEX idx_sensors_geom ON sensors USING GIST (geom);
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.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.