I am trying to select buffers "touching" a vector layer with a specific value. This vector layer comes from a categorized raster with values of 0 to 6.

How can I select buffers that "touch" or intersect with this vector layer where the value is equal to x?

Here is an example of the vector layer with values of 4 (yellow), 5 (orange) and 6 (red). How can I select buffers contained only in 6 (red) for example? vector layer


You could use a couple of vector selection algorithms from the processing toolbox. First, use 'Select by attribute' to select features in your vector layer with the desired value. Input the layer, the attribute field which contains your values, use the = operator and supply the value (e.g. 6 in your example).

Then run the tool 'Select by location'. Enter your buffer layer as the layer to Select features from, tick the geometric predicate you wish to use (touches, intersects, are within etc). For the input: 'by comparing to features from' select your vector layer where the features are already selected by attribute value, and tick the check box to use selected features only.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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