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).

4
  • It may not matter to you, but what operating system are you currently using? Commented Dec 9, 2013 at 16:42
  • typically windows at work / mac at home. Commented Dec 9, 2013 at 19:29
  • 1
    I mostly use QGIS on Ubuntu as my sql spatial client, when I need to see the results after running / construcing a query Commented Dec 13, 2013 at 22:38
  • Out of interest, what can't you do in QGIS that you regularly would need to do on your database, given that you can run all kinds of SQL directly using the Database Manager?
    – Simbamangu
    Commented Dec 14, 2014 at 15:45

2 Answers 2

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

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.