Monday 20 May 2019

shapefile - Closing spaces within polygon in QGIS?


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.



Answer



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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...