3

I've got a large dataset in PostGIS which I've made available to an indirect colleague who's using ArcGIS. However, he can't load most of the features which have the polygon geometry type.

I've already tried using ST_MakeValid and furthermore, I've validated all features with ST_IsValid; which they are.

The error message he's getting in ArcGIS is a "Shape integrity error". Does anyone have an idea what it could be? Furthermore, does anyone know a good workflow in which I can troubleshoot this myself? Since I don't have the ArcGIS software I can't verify my solutions.

New contributor
Stef Gootzen is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2

I have experienced similar issues, where data that is perfectly fine according to PostGIS and QGIS (tested with ST_MakeValid in PostGIS, and by loading the data in QGIS and running QGIS's geometry validity checker), still couldn't be loaded reliable in ArcGIS.

Note that the data in my case was stored in WGS 1984 (SRID 4326) "geometry" storage (so not "geography").

I finally solved it by using two strategies:

  • Run ST_Buffer in PostGIS with a tolerance of 0, which is a quite common practice according to what I read to solve some difficult to resolve geometry errors.

  • If that still fails to return a valid data set for ArcGIS (and it wasn't enough in my case...), I recommend deleting any Polygon geometry record having an area less than 1 square meter.

To do this, I calculated the geodesic area for all Polygons in PostGIS, and subsequently deleted the ones with area < 1 m2. The latter action solved my issues, and allowed ArcGIS to finally accept the data as 100% valid and load it without issues as an ArcGIS Query Layer.

If you want to calculate the geodesic area as well, you can use:

  • If your data is in SRID 4326: ST_Area(<GEOMETRY_COLUMN_NAME>::geography,False)

  • Other projection: ST_Area(ST_Transform(<GEOMETRY_COLUMN_NAME>,4326)::geography,False)

However, depending on your data, I don't know if this latter action is acceptable, although arguably, Polygons with an area < 1 m2 are likely erroneous in most GIS datasets (sliver data etc.). There is not much use for such tiny geometries in the real world of GIS daily practice and databases.

By the way, I have no idea why ArcGIS isn't capable of using these tiny shapes, while QGIS happily ingests them. Looking at the WKT representation of problematic features in DBeaver, apparently showed a valid representation. Maybe it is something to do with maximum coordinate precisions in ArcGIS, and conversions (transparently executed - not visible to user) needed to get the data in ArcGIS ready format for display, and / or the combination with storage of coordinates in lat/long SRID 4326 instead of a more regular planar projection like Web Mercator, but this is all speculation...

| improve this answer | |

Your Answer

Stef Gootzen is a new contributor. Be nice, and check out our Code of Conduct.

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.