3

I'm digitising a large number of maps from hand drawn mud maps and digital images, and although I have used the snapping tools ("snap to vertex and segment", Tolerance 10 pixels, avoid intersections) I consistently get ~30 geometry errors. My workflow is as follows:

  1. digitise (polygons) using snapping settings as above
  2. Use GRASS tools to remove most bad geometry (v.in.ogr.qgis, snapping threshold 0.02 min size 0.0001)
  3. Dissolve polygons with same attribute
  4. Check geometry validity

check geometry validity

I consistently get around 30 errors that persist, but if I tweak the GRASS setting anymore it changes the map into an unrecognisable blob. Tutorials like this one tell you how to find the errors and then it say "fix them", but I guess I haven't figured out a good way to fix them? The errors are always of this type, a green cross where polygons meet and their handles overlap:

geometry error

It seems the only way I can figure out to fix them is to nudge one polygon slightly to the side, so it's no longer overlapping that one point anymore, but I worry that will mess with any spatial analyses I run?

My questions are:

  1. How do I avoid getting all these errors?
  2. How do I fix them if they do occur?
  3. Are they important?

I'm not a QGIS power user.

This is what the problem looks like when I nudge the polygons apart, the top three polygons all join in the same node, while the fourth (bottom right) is the one that is overlapping and causing the problem.

polygon move

zoomed out (area ~1x1m), error highlighted with red cross

zoom out geometry error

  • Is the yellow (or green) polygon one polygon or two? The errors you're getting seem to be self-intersections which are BAD and need to be fixed as one part will be going in the wrong direction (clockwise/counter clockwise) - all polygons should be clockwise on their exterior and counter for islands/holes. – Michael Stimson Sep 15 '15 at 5:16
  • They're separate polygons, but three are 'joined' on the highlighted node, while the fourth (bottom right yellow) is separate, so I assume the one that's causing the problem. After the dissolve however, the yellow polygons al correspond to one line in the attribute table. I'll update the question with a picture. Thanks for taking the time @MichaelMiles-Stimson :) – Kapeppa Sep 15 '15 at 5:23
  • 1
    Then they should be (mostly) fine.. have a read of gis.stackexchange.com/questions/69425/… and see if anything there looks good. Many years ago (many many) I wrote a tool to round coordinates to the 3rd decimal place to avoid having errors like this, but that worked in coverages on ArcInfo workstation; the theory is the same though. Do you have scripting ability? – Michael Stimson Sep 15 '15 at 5:33
  • Thanks @MichaelMiles-Stimson, that's reassuring... I don't have any python experience, but I'm generally ok with figuring out coding/scripting issues in R etc, so if push comes to shove I should be ok to figure it out if I understand what I'm trying to achieve. Any idea what would be repeatedly causing these self intersections and what I could do to stop them? – Kapeppa Sep 15 '15 at 5:54
  • No, you've done all you can to avoid getting errors. I don't understand how they are being created. The only thing I could suggest is to use a different vector storage (I like PostGIS) or try a different version of QGIS. I don't remember seeing any problems using QGIS Wroclaw with PostGIS geometry types. – Michael Stimson Sep 15 '15 at 21:49

Your Answer

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

Browse other questions tagged or ask your own question.