PostGIS

Spatial and Geographic objects for PostgreSQL

  • Home
  • Download
  • Documentation
  • Development
  • Support

About PostGIS

PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL.

WITH city AS (
  SELECT 'Gotham' AS name,
    ST_Buffer(ST_Point(0,0), 10) AS geom
)
 , superhero(name,geom) AS (
    VALUES
      ('Bat Boy', ST_Point(0.1,0))
    , ('Bat Girl', ST_Point(1,1) )
)
SELECT superhero.name
FROM city INNER JOIN superhero
    ON ST_Contains(city.geom, superhero.geom)
WHERE city.name = 'Gotham';

Docs for latest stable release

In addition to basic location awareness, PostGIS offers many features rarely found in other competing spatial databases such as Oracle Locator/Spatial and SQL Server. Refer to PostGIS Feature List for more details.

Should you upgrade now?

Not sure if you are running the best possible PostGIS for your PostgreSQL? Refer to our Version compatibility and EOL Policy.

License

PostGIS is released under the GNU General Public License (GPLv2 or later). Refer to License FAQ for more information. PostGIS is developed by a group of contributors led by a Project Steering Committee.

News

What's happening right now

Blogs, Tweets and more…

Follow @postgis

PostGIS 3.2.0alpha1 Released

The PostGIS Team is pleased to release the first alpha of the upcoming PostGIS 3.2.0 release.

Best served with PostgreSQL 14 beta3. This version of PostGIS utilizes the faster GiST building support API introduced in PostgreSQL 14. If compiled with the in-development GEOS 3.10dev you can take advantage of improvements in ST_MakeValid. This release also includes many additional functions and improvements for postgis_raster and postgis_topology extensions.

Read More…


PostGIS 3.1.4, 3.0.4 Released

The PostGIS development team is pleased to provide bug fix and performance enhancements 3.1.4 and 3.0.4 for the 3.1, 3.0 stable branches.

3.1.4 This release supports PostgreSQL 9.6-14.

  • source download
  • NEWS
  • PDF docs en
  • html doc download
  • html online en
  • epub doc download

3.0.4 This release works with PostgreSQL 9.5-13 and GEOS >= 3.6 Designed to take advantage of features in PostgreSQL 12+ and Proj 6+

  • source download
  • NEWS
  • PDF docs en
  • html doc download
  • epub doc download

View all closed tickets for 3.1.4, 3.0.4.

After installing the binaries or after running pg_upgrade:

For PostGIS 3.1, 3.0, 2.5 do below which will upgrade all your postgis extensions.

SELECT postgis_extensions_upgrade();

For PostGIS 2.4 and below do:

ALTER EXTENSION postgis UPDATE;

— if you use the other extensions packaged with postgis — make sure to upgrade those as well

ALTER EXTENSION postgis_sfcgal UPDATE;
ALTER EXTENSION postgis_topology UPDATE;
ALTER EXTENSION postgis_tiger_geocoder UPDATE;

If you use legacy.sql or legacy_minimal.sql, make sure to rerun the version packaged with these releases.

PostGIS 3.1.3

The PostGIS Team is pleased to release PostGIS 3.1.3! Best Served with PostgreSQL 14 beta2.

This release is a bug fix release, addressing issues found in the previous 3.1 release.

  • #4929, Fix missing error from GetRingEdges when invoked with unexistent topology or edge (Sandro Santilli)

  • #4927, Fix PostgreSQL 14 compile FuncnameGetCandidates changes needed to compile against PostgreSQL 14 beta2 or higher (Regina Obe, Julien Rouhaud)

Read More…


PostGIS 3.1.2

The PostGIS Team is pleased to release the release of PostGIS 3.1.2!

This release is a bug fix release, addressing issues found in the previous 3.1 release.

  • #4871, TopoGeometry::geometry cast returns NULL for empty TopoGeometry objects (Sandro Santilli)
  • #4826, postgistigergeocoder Better answers when no zip is provided (Regina Obe)
  • #4817, handle more complex compound coordinate dystems (Paul Ramsey)
  • #4842, Only do axis flips on CRS that have a “Lat” as the first column (Paul Ramsey)
  • Support recent Proj versions that have removed pjgetrelease (Paul Ramsey)
  • #4835, Adjust tolerance for geodetic calculations (Paul Ramsey)
  • #4840, Improper conversion of negative geographic azimuth to positive (Paul Ramsey)
  • #4853, DBSCAN cluster not formed when recordset length equal to minPoints (Dan Baston)
  • #4863, Update bboxes after scale/affine coordinate changes (Paul Ramsey)
  • #4876, Fix raster issues related to PostgreSQL 14 tablefunc changes (Paul Ramsey, Regina Obe)
  • #4877, mingw64 PostGIS / PostgreSQL 14 compile (Regina Obe, Tom Lane)
  • #4838, Update to support Tiger 2020 (Regina Obe)
  • #4890, Change Proj cache lifetime to last as long as connection (Paul Ramsey)
  • #4845, Add Pg14 build support (Paul Ramsey)

Read More…


More News…

Upcoming Events

FOSS4G 2021 FOSS4G Europe 2021
Sept 27 - Oct 2nd 2021, Virtual Conference Online


Recent past events


PostgresVision 2021

JUNE 22-23, 2021 ONLINEVideos


Virtual PostGIS Day 2020 Conference PostGIS Day 2020 Crunchdata
Thursday November 19 2020
Videos



PGCon 2020

May 26-29 2020, Ottawa, ON, Canada CHANGED TO ONLINE


PostGIS Day 2019 St. Louis Videos
Nov 14 2019, St. Louis, MO, USA
PGConf EU, Milan Italy
PGConf EU 2019

Oct 15-18 2019, Milan, Italy


PostgresOpen 2019 Orlando, FL, USA
PostgresOpen 2019

Sept 11-13 2019, Orlando, FL, USA
FOSS4G 2019 International Conference
FOSS4G 2019
  Videos
August 26-30 2019, Bucharest, Romania



PostgresVision 2019

June 24th-26th 2019, Boston, MA, USA



FOSS4G NA 2019

April 16-18 2019, San Diego, CA, USA

Tips

Move PostGIS extension to a different schema

As of PostGIS 2.3, the postgis extension was changed to no longer allow relocation. All function calls within the extension are now schema qualified.

While this change fixed some issues with database restore, it created the issue of if you installed PostGIS in a schema other than the one you wanted to it is not intuitive how to move it to a different schema. Luckily there is a way to do this.

For this exercise, I will install PostGIS in the default schema and then demonstrate how to move it into another schema location.

You can run these steps using psql or pgAdmin or any other PostgreSQL tool you want.

Read More…


More Tips…

Case Studies

Howard Hughes Medical Institute

As a software engineer at the Howard Hughes Medical Institute, I work on a collaborative neuron reconstruction and analysis software called CATMAID 1 (screenshot: 3), which is used for neuroscience research. We use PostGIS to represent neurons in a 3D space.

Read More…


Vanguard Appraisals

Vanguard Appraisals is new to the GIS world. In fact, we aren’t really in the GIS world; we just kind of brush up against it. We do mass property appraisal for entire county and city jurisdictions, and we develop software to collect, price and maintain values. We also host assessment data online so that homeowners can search and find property information much simpler from the comfort of their own home. Our software and websites are used in 7 states (IA, IL, MN, MO, NE, ND, SD).

Read More…


More Case Studies…

Site Map

  • Home
  • Install
  • Documentation
  • Development
  • Planet PostGIS
  • Support

PostGIS Project Steering Committee (PSC)

  • Paul Ramsey (Chair)
  • Sandro Santilli
  • Regina Obe
  • Bborie Park
  • Darafei Praliaskouski
  • Raúl Marín Rodríguez