4

I have two geopackage layers that I need to do some analysis on in QGIS.

Layer 1: Points with different data in the columns
Layer 2: Polygons with different data in the columns, one of which is "Nature type". There are 12 different nature types in total.

I want to select all points from layer 1 within layer 2 without the nature type equals "Forest".

How do i go about this?

1
  • If you look at the Select by Location tool you have the option of using only selected features as an input. So you can just select by attribute from your nature types and then run a select by location on the points. I generally expect, until shown otherwise, that tools run using only on selected features if the option isn't explicitly available.
    – John
    Commented Nov 30, 2022 at 15:14

1 Answer 1

6

Use the Select by expression tool. Set the point layer in the Input layer parameter, and use the following expression in the expression parameter .

overlay_within(
    layer:='polygon layer name/id',
    filter:="Nature type" != 'Forest'
)
1
  • Or the inverse way: select only the forest points, then click Invert Feature Selection
    – Babel
    Commented Nov 30, 2022 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.