2

I have a shapefile displaying the borders of several city units. One of its polygons, however, had free space consisting of four vertices in it. I created another polygon inside the free space and then used Dissolve to close the free space. The result was the following layer which still contains some errors (see the close-ups below).

Is the best way to resolve this in QGIS 2.2 using some kind of v.clean?

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

The entire data seems to be corrupted. Using Dissolve on the entire shape results in what the fourth screenshot shows.

3

I wouldn't necessarily call this 'corrupted' as opposed to just 'not clean'. It looks to me like there weren't any topological rules enforced when it was created. What you're seeing are (I believe) the results of slivers amongst the original polygons because their boundaries are not coincident (probably just x,y but possibly z). The question then becomes how do you want to approach the problem and how big a fix do you need? You could use some editing and topology tools to clean up your original data. So that all features are coincident (100% coverage, no overlap, and all vertices shared).

There are a couple of ways to address the original question. One would be to create a shape that completely contains the hole in the original before dissolving rather than snapping to those vertices. Another approach I often use is to edit the nodes/vertices of the polygon and simply delete the ones that are interior and causing problems.

  • Further to the first part of Chris W's answer, v.clean using rmarea should sort you out (grass.osgeo.org/grass64/manuals/v.clean.html). Further to the second part, if you set the snapping options to "avoid int(ersection)" and create a polygon larger than your hole, it will automatically "shrink" to a polygon of exactly the right size. Dissolve/merge operations should then not leave any sliver polygons. – blackthorn May 27 '14 at 5:59
  • Thank you both. I ran v.clean/rmarea and Dissolve afterwards. You can see the result in the newly uploaded screenshot. But when I try to eliminate the troublesome vertices within the polygon using the Node Tool, selecting a vertix and pressing Del nothing happens. When I do the same thing again, QGIS crashes after a couple of tries (OS: Ubuntu 14.04). So there seems to be something wrong with what I did. As I wrote, so far I'm only familiar with digitising in ArcGIS, so if you guys have some more advice for me, it'd be highly appreciated. – T. K. May 29 '14 at 12:52
  • @T.K. Arc is also where all my digitizing experience is - I basically think of how I would fix it there and then search for QGIS specific tools/solutions using the same terms or 'equivalent tool' query. It's possible that you do in fact have some bad geometries in your data. Try running a geometry validator and seeing what comes back. – Chris W May 29 '14 at 17:44
  • Interesting, I didn't know that tool yet. Depending on which layer I chose, it reported between eight and 32 errors. Knowing that, I dissolved the polygon once more until I had only one feature left. After that, I did what you, Chris, told me initially - I created a couple of new polygons and merged them afterwards. The last part of it all was to use v.clean/rmdangle in order to get rid of some small lines inside the border. It all worked out fine in the end (see screenshot) - thanks for your patience! – T. K. May 29 '14 at 22:17

Your Answer

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.