Friday, 10 February 2017

features - Deleting lines in QGIS


I have a layer with several shapes and from here I want to delete the lines. I tryed Toggle editing and Select features by polygon but when closing the polygon, it dissapears. Also I tried to delete all the nodes that I don't want by selecting them with the Node Tool buton, but nothing happened. What do you suggest me to do?


This is my example: enter image description here


enter image description here



Answer



Your shapefile contains a multipart single feature as mentioned by @HDunn. In order to delete separate polygons, you will need to convert this to singleparts by using the Multipart to Singleparts tool:


Vector > Geometry Tools > Multipart to Singleparts.


I ran this and saved the output as "Free space v2.shp". Now you can edit and delete those pesky polygons!



Multipart layer


Multipart layer edited


I noticed there's quite a few of those dangles in your layer. A good method may be to use GRASS's v.clean tool with the rmdangle option to remove them automatically. You can access this from:


Processing Toolbox > GRASS commands > Vector (v.) > v.clean*


I used the following parameters (note the fairly high threshold):


v.clean


Before being cleaned:


Before cleaned


After being cleaned:


After cleaned



If there are any more polygons you don't want, you can remove them manually as there should be a lot less of them now.


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