I have an ArcGIS 10.5.1 enterprise geodatabase hosted on PostgreSQL 9.4 (non-PostGIS enabled, but with SDE.ST_Geometry support). I'd like to add some feature classes as layers in QGIS. How can I do this?

  • 2
    This question is a bit confusing. "Geodatabase" is a term that refers to a database where an Esri geometry datatype has been added (or an RDS node with PostGIS enabled, where the Esri SDE tables have been populated). Do you have SDE.ST_Geometry enabled in this database? Not enabling PostGIS removes one of the most popular geometry column solutions from your options (and QGIS support, too, I think). – Vince Dec 12 '18 at 18:21
  • It's an Enterprise geodatabase. Yes, I've copied the st_geometry library to the postgres server and it should be sde.st_geometry enabled – ErieCoGis Dec 12 '18 at 21:16
  • I think you may be right, it looks like QGIS may only support connecting to PostGIS enabled Postgres databases. – ErieCoGis Dec 12 '18 at 21:27
  • Please edit the question to include the exact version of PostgreSQL and the exact version of ArcGIS geodatabase. – Vince Dec 12 '18 at 21:57
  • I've updated the question to include the version numbers of Postgres and the ArcGIS geodatabase – ErieCoGis Dec 12 '18 at 22:05

It's not possible - you need to use real PostGIS geometries instead.

  • It looks like I can only use the PostGIS template when initially running the Create Enterprise Geodatabase tool. So I'm thinking, I could create a new db, and copy my feature classes over to the new, PostGIS enabled Enterprise geodatabase. Or is there an easier way to do this? – ErieCoGis Dec 13 '18 at 22:30

In QGIS open the Data Source Manager, click PostgreSQL on the left, add a new connection, fill out the database connection details:

enter image description here

Once that's added click Connect. Once you're all connected up you can add any layers you want.

  • If it isn't PostGIS enabled I think you should click on "Also list tables with no geometry", otherwise you may not see any layer in de DB. – guillermo_dangelo Dec 12 '18 at 19:57
  • Thank you for the clear directions. I put in my connection info for my database and clicked "test connection" and it succeeds. When I add the connection and click Connect however, it says "Retrieving tables of <database name>..." and I cannot add layers successfully to the canvas – ErieCoGis Dec 12 '18 at 21:25
  • I also tried checking the option "Also list tables with no geometry" – ErieCoGis Dec 12 '18 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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