In QGIS 3.22.16 I try to select and delete some roads (lines) that have a False value in the attribute table. Along with that, I need to delete all the gullies (points)along these road.

I don't have any related Field in both layer. The majority of them are not overlapping on those roads. I think of creating some buffers around those roads. And using the select by location tool to highlight those points.

Is there a better way to select those points that are along the False roads?

  • I guess that's the most straightforward way.
    – Erik
    Commented Sep 19, 2023 at 15:08
  • 2
    Join attribute by nearest: if two layers are not overlapping, I'd use that tool to join a field (False values) from lines to points.
    – foxhq
    Commented Sep 19, 2023 at 15:10

2 Answers 2


You can try to use the select-by-expression tool in qgis. With selected POINT_Layer use the fowlling expression (substitute 100 by the wanted buffer width):

within($geometry, buffer(aggregate('ROAD_LAYER','collect',$geometry),100))

enter image description here

This is based on: qgis-select-by-expression-buffer-selection

Use the collect function to create a multiline geometry. Use this multiline geometry in the intersects function. Because we're using collect on a different layer, we have to put it inside the aggregate() function


You may use the ovelay_nearest fonction to select the point (do it before deleting the line) this way :

     layer:='LINE' -- set here the name of your road layer
    ,filter:=  "LINE_FIELD" = 'False' --filter the target features to check, set it to get roads that have a False value in the attribute table
    ,limit:=-1 --limit the number of matching features. If not set, only the nearest feature will be returned. If set to -1, returns all the matching features
    ,max_distance:=120 --an optional distance to limit the search of matching features, set it to an appropriate value to only get point close to your line

This will let you select only the point that are less than 120 unit (adjust the value to your need) from the LINE layer where the "LINE_FIELD" is equal to 'False' (adapt this to your actual layer and field name)

enter image description here

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.