4

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

8
  • I presume the issue is with the small spike top right, this is probably a difference in precision between the two tools.
    – Ian Turton
    Commented Feb 23, 2023 at 13:54
  • Does the ESRI tool show the place of the (non existing) self-intersection? Could you send also the shp that is fixed by the ESRI tool as a comparison?
    – user30184
    Commented Feb 23, 2023 at 14:34
  • 1
    The Check Validity tool does have some options, GEOS or QGIS and self intersections or not. You might try running the Topology Checker plugin and check geometry as well as topology. Although I don't use it there is a Check Geometries plugin as well.
    – John
    Commented Feb 23, 2023 at 15:17
  • 2
    Regarding " I ran all the needed check-ups but with QGIS tools," it is better to be explicit than let readers assume. What specific tools did you run and what parameters did you pass to them?
    – bixb0012
    Commented Feb 23, 2023 at 16:24
  • @user30184 The ESRI tool only specifies which feature has intersections, but not the location. I added the shp after running the ESRI's repair geometry tool to the description. Commented Feb 24, 2023 at 9:17

1 Answer 1

5

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

2
  • Thank you for this, user30184! I was thinking that this could be an ESRI bug, now I'm almost certain. I read the tool documentation (which is not that elaborate) and could conclude that this is a bug, which I also reported through the ESRI website (I wonder if anything will come of it). Your and @Borhgs proposal for simplyfing the geometry by a certain tolerance (e.g. by the QGIS snap points to grid tool) can solve my problem. This snapping however disturbes the otherwise topologically correct set of layers, but if I integrate the tool in the creation process, this should solve my problem! Commented Feb 27, 2023 at 7:57
  • A guess without any testing - check the XY Tolerance of the shapefile. While the Check Geometry tool does not explicity mention it uses this, I'd suspect it does. 0.001 metres (1mm) looks to be the default tolerance, and that number is right in the ballpark of the 2mm mentioned. pro.arcgis.com/en/pro-app/latest/tool-reference/appendices/…
    – KHibma
    Commented Feb 27, 2023 at 14:03

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.