Skip to content
postgis

postgis

postgis : PostGIS geometry and geography spatial types and functions

Overview

ID Extension Package Version Category License Language
1500
postgis
postgis
3.6.3
GIS
GPL-2.0
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d--
No
Yes
No
Yes
no
no
Relationships
Need By
documentdb
h3_postgis
mobilitydb
pgrouting
pointcloud_postgis
postgis_raster
postgis_sfcgal
postgis_tiger_geocoder
postgis_topology
pg_eviltransform
See Also
pointcloud
h3
pg_geohash
geoip
pg_polyline
earthdistance
ogr_fdw
tzf
Siblings
postgis_topology
postgis_raster
postgis_sfcgal
postgis_tiger_geocoder
address_standardizer
address_standardizer_data_us

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PGDG
3.6.3
18
17
16
15
14
postgis -
RPM
PGDG
3.6.3
18
17
16
15
14
postgis36_$v -
DEB
PGDG
3.6.3
18
17
16
15
14
postgresql-$v-postgis-3 -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
el8.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
el9.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
el9.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
el10.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
el10.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
d12.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
d12.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
d13.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
d13.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
u22.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
u22.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
u24.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
u24.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
u26.x86_64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
u26.aarch64
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
PGDG 3.6.3
Package Version OS ORG SIZE File URL
postgis36_18 3.6.3 el8.x86_64 pgdg 5.1 MiB postgis36_18-3.6.3-1PGDG.rhel8.10.x86_64.rpm
postgis36_18 3.6.1 el8.x86_64 pgdg 5.2 MiB postgis36_18-3.6.1-1PGDG.rhel8.10.x86_64.rpm
postgis36_18 3.6.0 el8.x86_64 pgdg 5.1 MiB postgis36_18-3.6.0-1PGDG.rhel8.1.x86_64.rpm
postgis36_18 3.6.3 el8.aarch64 pgdg 5.0 MiB postgis36_18-3.6.3-1PGDG.rhel8.10.aarch64.rpm
postgis36_18 3.6.1 el8.aarch64 pgdg 5.1 MiB postgis36_18-3.6.1-1PGDG.rhel8.10.aarch64.rpm
postgis36_18 3.6.0 el8.aarch64 pgdg 5.0 MiB postgis36_18-3.6.0-6PGDG.rhel8.aarch64.rpm
postgis36_18 3.6.0 el8.aarch64 pgdg 5.0 MiB postgis36_18-3.6.0-1PGDG.rhel8.1.aarch64.rpm
postgis36_18 3.6.3 el9.x86_64 pgdg 4.2 MiB postgis36_18-3.6.3-1PGDG.rhel9.7.x86_64.rpm
postgis36_18 3.6.2 el9.x86_64 pgdg 4.2 MiB postgis36_18-3.6.2-1PGDG.rhel9.7.x86_64.rpm
postgis36_18 3.6.1 el9.x86_64 pgdg 4.2 MiB postgis36_18-3.6.1-1PGDG.rhel9.7.x86_64.rpm
postgis36_18 3.6.0 el9.x86_64 pgdg 4.2 MiB postgis36_18-3.6.0-6PGDG.rhel9.x86_64.rpm
postgis36_18 3.6.0 el9.x86_64 pgdg 4.2 MiB postgis36_18-3.6.0-4PGDG.rhel9.x86_64.rpm
postgis36_18 3.6.0 el9.x86_64 pgdg 4.2 MiB postgis36_18-3.6.0-1PGDG.rhel9.1.x86_64.rpm
postgis36_18 3.6.3 el9.aarch64 pgdg 4.2 MiB postgis36_18-3.6.3-1PGDG.rhel9.7.aarch64.rpm
postgis36_18 3.6.2 el9.aarch64 pgdg 4.2 MiB postgis36_18-3.6.2-1PGDG.rhel9.7.aarch64.rpm
postgis36_18 3.6.1 el9.aarch64 pgdg 4.2 MiB postgis36_18-3.6.1-1PGDG.rhel9.7.aarch64.rpm
postgis36_18 3.6.0 el9.aarch64 pgdg 4.2 MiB postgis36_18-3.6.0-6PGDG.rhel9.aarch64.rpm
postgis36_18 3.6.0 el9.aarch64 pgdg 4.2 MiB postgis36_18-3.6.0-4PGDG.rhel9.aarch64.rpm
postgis36_18 3.6.0 el9.aarch64 pgdg 4.2 MiB postgis36_18-3.6.0-1PGDG.rhel9.1.aarch64.rpm
postgis36_18 3.6.3 el10.x86_64 pgdg 4.3 MiB postgis36_18-3.6.3-1PGDG.rhel10.1.x86_64.rpm
postgis36_18 3.6.2 el10.x86_64 pgdg 4.3 MiB postgis36_18-3.6.2-1PGDG.rhel10.1.x86_64.rpm
postgis36_18 3.6.1 el10.x86_64 pgdg 4.3 MiB postgis36_18-3.6.1-1PGDG.rhel10.1.x86_64.rpm
postgis36_18 3.6.0 el10.x86_64 pgdg 4.2 MiB postgis36_18-3.6.0-4PGDG.rhel10.x86_64.rpm
postgis36_18 3.6.0 el10.x86_64 pgdg 4.2 MiB postgis36_18-3.6.0-1PGDG.rhel10.1.x86_64.rpm
postgis36_18 3.6.3 el10.aarch64 pgdg 4.2 MiB postgis36_18-3.6.3-1PGDG.rhel10.1.aarch64.rpm
postgis36_18 3.6.2 el10.aarch64 pgdg 4.2 MiB postgis36_18-3.6.2-1PGDG.rhel10.1.aarch64.rpm
postgis36_18 3.6.1 el10.aarch64 pgdg 4.2 MiB postgis36_18-3.6.1-1PGDG.rhel10.1.aarch64.rpm
postgis36_18 3.6.0 el10.aarch64 pgdg 4.2 MiB postgis36_18-3.6.0-4PGDG.rhel10.aarch64.rpm
postgis36_18 3.6.0 el10.aarch64 pgdg 4.2 MiB postgis36_18-3.6.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-18-postgis-3 3.6.3 d12.x86_64 pgdg 3.4 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg12+1_amd64.deb
postgresql-18-postgis-3 3.6.2 d12.x86_64 pgdg 3.4 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg12+1_amd64.deb
postgresql-18-postgis-3 3.6.3 d12.aarch64 pgdg 3.3 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg12+1_arm64.deb
postgresql-18-postgis-3 3.6.2 d12.aarch64 pgdg 3.3 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg12+1_arm64.deb
postgresql-18-postgis-3 3.6.3 d13.x86_64 pgdg 3.5 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg13+1_amd64.deb
postgresql-18-postgis-3 3.6.2 d13.x86_64 pgdg 3.5 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg13+1_amd64.deb
postgresql-18-postgis-3 3.6.3 d13.aarch64 pgdg 3.4 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg13+1_arm64.deb
postgresql-18-postgis-3 3.6.2 d13.aarch64 pgdg 3.4 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg13+1_arm64.deb
postgresql-18-postgis-3 3.6.3 u22.x86_64 pgdg 3.6 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg22.04+1_amd64.deb
postgresql-18-postgis-3 3.6.2 u22.x86_64 pgdg 3.6 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg22.04+1_amd64.deb
postgresql-18-postgis-3 3.6.3 u22.aarch64 pgdg 3.5 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg22.04+1_arm64.deb
postgresql-18-postgis-3 3.6.2 u22.aarch64 pgdg 3.5 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg22.04+1_arm64.deb
postgresql-18-postgis-3 3.6.3 u24.x86_64 pgdg 3.4 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg24.04+1_amd64.deb
postgresql-18-postgis-3 3.6.2 u24.x86_64 pgdg 3.4 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg24.04+1_amd64.deb
postgresql-18-postgis-3 3.6.3 u24.aarch64 pgdg 5.7 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg24.04+1_arm64.deb
postgresql-18-postgis-3 3.6.2 u24.aarch64 pgdg 5.7 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg24.04+1_arm64.deb
postgresql-18-postgis-3 3.6.3 u26.x86_64 pgdg 3.5 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg26.04+1_amd64.deb
postgresql-18-postgis-3 3.6.2 u26.x86_64 pgdg 3.5 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg26.04+1_amd64.deb
postgresql-18-postgis-3 3.6.3 u26.aarch64 pgdg 5.7 MiB postgresql-18-postgis-3_3.6.3+dfsg-1.pgdg26.04+1_arm64.deb
postgresql-18-postgis-3 3.6.2 u26.aarch64 pgdg 5.7 MiB postgresql-18-postgis-3_3.6.2+dfsg-1.pgdg26.04+1_arm64.deb

Source

Install

Make sure PGDG repo available:

pig repo add pgdg -u    # add pgdg repo and update cache

Install this extension with pig:

pig install postgis;		# install via package name, for the active PG version

pig install postgis -v 18;   # install for PG 18
pig install postgis -v 17;   # install for PG 17
pig install postgis -v 16;   # install for PG 16
pig install postgis -v 15;   # install for PG 15
pig install postgis -v 14;   # install for PG 14

Create this extension with:

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 geometry in an appropriate projected SRID for planar distances and areas; use geography when you need meter-based spheroidal calculations.
  • PostGIS 3.6.3 is 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.
Last updated on