Wednesday 22 March 2017

qgis - Deleting 'garbage' nodes after polygon dissolve



I work with QGIS 2.10.1 on Windows 7 (x64). I have dissolved polygons from an attribute value and the polygons geometries being not perfectly joined together, I get some 'garbage' nodes I need to delete. I have tried to edit the layer and using nodes tool, selecting and deleting the nodes, but it seems impossible to do (nodes are not deleted at all!). Any idea on how to process this kind of clean-up?



EDIT : you can download the shapefile here for testing.


enter image description hereenter image description here



Answer



I tested your shapefile and used GRASS algorithm v.clean from the Processing Toolbox. I applied snap as the cleaning tool and used a threshold of 5 which seemed to have cleaned up your shapefile a fair bit.


This is your original shapefile loaded:


Original shapefile


This is it cleaned using GRASS (notice the little yellow polygon that was dissolved originally but is now separate):


Cleaned shapefile


Just to show the difference in nodes, here was the original:


Original nodes



And here it is after being cleaned:


Cleaned nodes


Hope this helps!


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...