I'm new at this, a novice at best. I'm using QGIS 1.7.3. I simply want to select a large number of polygons on screen and hit the delete key to delete them and resave the shapefile. Can this be done?
4 Answers
Here's what you need to do:
Enable editing of the layer (by default, you can't edit it). Highlight the layer in the list of layers on the left side of the screen. Right click, and choose "Toggle editing". You should now see a pencil icon in the list of layers.
Now, select your polygons. There are several tools to do this; the rectangle tool is good for mass deleting. Go to View > Select > Select Features by Rectangle (for newer version of QGIS: Edit > Select > Select Features by Polygon). Now draw a rectangle around the polygons you want to delete.
To delete, choose Edit > Delete Selected.
Finally, to save, choose Layer > Save Edits. (This is also a good time to turn off editing, by doing a second "Toggle editing.")
-
3Note: You can assign a shortcut to the Delete Selected button via Settings->Configure Shortcuts. I tend to assign it to the.....delete key :)– Nathan WJan 26, 2012 at 22:39
Yes. Start editing your layer, then select the polygons using the select tool of your choice. Then find the "Delete Selected" button on the editing toolbar, click it, and save your edits. Done!
Edit: The delete key won't perform the delete function by default, but I believe you can override it in the "Settings > Configure Shortcuts" menu.
There are many ways to select large number of features
- you can use any of the polygon selection methods described by Evan above.
- hold down Ctrl key and click on a bunch of features to create a selection
- use a SQL query to select by attributes
Your question inspired me to write down detailed instructions for all of these, You can check them at http://qgis.spatialthoughts.com/2012/02/tutorial-selecting-multiple-features-in.html
I can't find "toggle editing" and I can find no way to delete the selected polygons. Editing toolbar is grayed.
-
1This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review– VinceJan 30 at 1:14