10

Most of my experience with PostgreSQL has been pgAdminIII and psql, but I'm interested to know what others use.

Is there PostgreSQL equivalent to SQL Server Management Studio (SSMS) and its ability to display, in a limited way, results containing geometry (free or paid)?

Or do most people just run a GIS client on the side for this purpose, as this question seems to indicate: GUI tools for PostgreSQL/PostGIS??

I looked down through the PostgreSQL software catalog, but I didn't find anything (other than broken links).

Andre Silva
  • 10,259
  • 12
  • 54
  • 106
Jay Cummins
  • 14,642
  • 7
  • 66
  • 141

2 Answers2

6

pgAdmin 4 has now a Geometry Data Viewer since version 4.3.3 (release date: sept/2018; see pgAdmin release notes).

PostGIS extension needs to be enabled in the PostgreSQL database. The Geometry Data Viewer will display results on a map canvas from queries returning geometry and geography columns. If the SRID is 4326 results will be displayed over an OpenStreetMap background map.

See one example:

SELECT * FROM geo.country; -- querying a table named 'country' in schema 'geo'.

The query returns a table with a geometry column. Line 1 is the administrative boundary from Brazil. The button inside the red circle enables the Geometry Data Viewer.

enter image description here

The geometry is displayed in an empty canvas if the coordinate system is different from SRID 4326.

enter image description here

SELECT ST_Transform(geom, 4326) FROM geo.country; -- transform coordinates to SRID 4326.

Now the same result, but with coordinates transformed to SRID 4326 and with a background OpenStreetMap.

enter image description here

Andre Silva
  • 10,259
  • 12
  • 54
  • 106
5

While I have not actually installed it, I had read about the pgAdmin plugin called "PostGIS viewer" (Windows only) referenced here (2010). The first request to add something like this (that I found) was ticket #485.

Germán Carrillo developed a multiplatform "PostGIS viewer" based on PyQGIS. You can access old versions here, here, and here, all from 2011. The latest version (2012) uses the QGIS plugin "Fast SQL Layer", and includes detailed installation instructions for Windows and Linux.

RyanKDalton
  • 23,068
  • 17
  • 110
  • 178