I am fairly new to QGIS and I have a data set of points that I have plotted with lat & long. The points cover a large area and I'm am trying to figure out if there is a way to only show the points within an artificial boundary that I have created as a layer with the line tool. Basically, I have all these points outside of the boundary that I have created that I want to delete, or at least no appear on the map.
1 Answer
Convert the line to a polygon using
Menu Vector > Geometry Tools > Lines to polygons
.Run select by expression on the point layer with this expression:
overlay_disjoint ('polygons')
- replacepolygons
with the name of your polygon layer (output from step 1).Delete selected points. To delete, first select
toggle editing
(pen icon or keybord shortcutE
), then press the delete icon.
Blue: initial point layer; dark red: initial line; light red: polygon created in step 1; yellow: points selected in step 2:
-
-
-
OK great, thanks. I think I got it to work and the points have changed to to different colors, but I cannot figure out how to delete the points on the outside of the boundary. Commented Sep 20, 2022 at 20:42
-
The button for "delete selected" is grayed out and not available to click Commented Sep 20, 2022 at 20:45
-
See edited answer for that. However, that is very very basic QGIS stuff, you should first make yourself confident with basic vector editing before going to more complex workflows. See e.g. youtu.be/kCnNWyl9qSE - especially at 10:50: youtu.be/kCnNWyl9qSE?t=650– BabelCommented Sep 20, 2022 at 21:00