Problem in using PostGreSQL with ArcGIS Pro

3379
3
05-30-2019 10:25 PM
UtkarshSharma
New Contributor

Hi

I have a PostGreSQL 9.6.11 database with PostGIS 2.3 setup on Google Cloud. I am able to add geometry layers into this database using shp2postgis tool and also with QGIS 3 Import Layer option. I am also able to view these layers in QGIS 3.

I am having the following problem when trying to load this data in ArcGIS Pro 2.3.3

I am able to connect to this database (right click on databases in catalog -> select new database connection -> Choose PostGreSQL and enter credentials). This connection is successful and also shows the layers added via above said options. However, no layer loads into ArcGIS (right click on layers in db connection -> select add to current map). It shows error - Exception from HRESULT

Loading a query layer also fails with this error

What am I missing here?

Is there a specification to column names for a PostGIS db that can be loaded into ArcGIS Pro?

0 Kudos
3 Replies
George_Thompson
Esri Frequent Contributor

GeodatabaseEnterprise GIS

--- George T.
0 Kudos
MarcoBoeringa
MVP Regular Contributor

A couple of basic things to note and take care off:

- Field / column names with more than 30 characters will cause issues. Ensure you stay within that limit.

- Sanitize column names as well, preferably only use alphanumeric characters and underscore

- Don't start column name with number.

- Special field types like binary fields or PostgreSQL "hstore" type columns cannot be used in your queries. Exclude them in the SQL, or use database views to do so.

- Make sure you don't have GeometryCollection as shape type in any of the records in your geometry column, Polygon and MultiPolygon are OK.

- Run the AddIncrementingIDField_management tool. It will add an OBJECTID field including sequence, allowing you to make e.g. selections once the layer is added to the TOC of ArcGIS.

Also see my post here:

https://community.esri.com/ideas/15921-support-for-postgresql-11#comment-73925 

UtkarshSharma
New Contributor

Thanks for your reply. I will try these steps in case they help in resolving my issue

0 Kudos