postgis
postgis : PostGIS geometry and geography spatial types and functions
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | Yes | Yes | No | Yes | no | no |
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 3.7.0 | PIGSTY 3.7.0 | PIGSTY 3.7.0 | PIGSTY 3.7.0 |
| el8.aarch64 | N/A | PIGSTY 3.7.0 | PIGSTY 3.7.0 | PIGSTY 3.7.0 | PIGSTY 3.7.0 |
| el9.x86_64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| el9.aarch64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| el10.x86_64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| el10.aarch64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| d12.x86_64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| d12.aarch64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| d13.x86_64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| d13.aarch64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| u22.x86_64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| u22.aarch64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| u24.x86_64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| u24.aarch64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| u26.x86_64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
| u26.aarch64 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 | PGDG 3.7.0 |
Source
git.osgeo.org/gitea/postgis/postgis
postgis-3.7.0.tar.gz postgis-3.7.0-en.pdf postgis37-filter-requires-perl-Pg.sh
Install
Make sure PGDG repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
postgis 3.7.0 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. This major release requires PostgreSQL 14 or later, GEOS 3.10 or later, and PROJ 6.1 or later.
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.7.0is a major release. It drops PostgreSQL 12/13 and GEOS versions older than 3.10; review the topology tolerance changes and the move ofaddress_standardizerandtiger_geocoderpackaging before upgrading. After installing matching files, runSELECT postgis_extensions_upgrade();where the upstream upgrade procedure requires it.