QGIS Self-Intersection – Resolving Issues Not Found by QGIS but Detected by ArcGIS Pro

qgisself-intersection

I am working on a project that includes preparation of a series of polygon shapefiles that need to go through an official geometry/topology check-up before final submission. This official check-up uses ArcGIS tools (including the check geometry tool), but I am working mainly in QGIS (ver. 3.22 and 3.26).

After preparing the data I ran all the needed check-ups but with QGIS tools. This includes the QGIS check geometry tool. The tool didn't return any errors. When I submitted the data for an officiacl check-up (which uses ArcGIS tools) I got a reply that my polygons have "self intersections". By inspecting the data visually I cannot find any self-intersections.
One of the problematic polygons with self intersections?

In trying to find an open source solution to this problem I found some suggestions on this site and others. I tried:

  • a series of QGIS tools: fix geometries tool; buffer with 0 distance; dissolve; union; delete duplicate vertices..
  • GRASS GIS tool v.clean.
  • transformed the polyongs to lines and then constructed polygons again in QGIS (this is not a desirable solution, since my polygons frequently have holes in them)

All my attempts failed.

I even got myself an ArcGIS Pro (v. 2.8) trial version and found out that the ESRI repair geometry tool does the trick.

Does anyone know of an open source solution that would make my polygons go through the ESRI check geometry tool without (non existing) self intersection errors?

You can find one of the problematic shapefiles here: https://www.dropbox.com/s/mlqqdynf389752r/shp.zip?dl=0.
And here you can find the same polygon after running the ESRI repair geometry tool: https://www.dropbox.com/s/jqq7ic8fi1u8850/shp_repair.zip?dl=0

Best Answer

I checked the whole geometry vertex by vertex and there is certainly no self-intersection. Then I compared the "Es" and "Es_repaired" shapefiles and noticed that the repaired version had one vertex less.

The repair tool has combined two vertices which were about 1 mm apart. I wonder if the ESRI topology checker has some minimum limit for the distance between consequent vertices. If it has then the report could make sense, even there is no self-intersection really. If there isn't such documented or even configurable check, then I think that you have found a bug in the ESRI product. Or is it some self-made checker utility? Read the documentation and if the behavior feels like a bug, try to report it via your local ESRI dealer.

I believe that you can make the official check-up happy be simplifying the geometry with a tolerance of 0.002 meters.

enter image description here

Related Question