I have two layers of points:

  • The first layer contains points which have an attribute called "svf" with values between 0 and 1
  • The second layer contains a subset (in terms of location) of the points in the first layer

The green points are from the first layer, the big blue ones are from the second layer:

enter image description here

What I want to do now is to set the "svf" value to 0 for all points in the first layer, who have a corresponding point in the second layer.

I tried it using the "Join attributes by location" tool, but I couldn't get it to work the way I wanted it to.

  • "Select by location" followed by "Field calculator"
    – Albert
    Commented Nov 10, 2021 at 15:19
  • @MrXsquared they are probably a little apart, because both layers were derived from different polylines with 'Generate points (pixel centroids) along line'
    – Martin
    Commented Nov 10, 2021 at 15:21

1 Answer 1


You can select the nearby points using "Select by expression", then you can open the calculator to update the desired field.

The expression would make use of overlay_nearest() to find points having a nearby point in the 2nd layer. You must specify a maximal acceptable distance between the points (beware of the coordinate system unit)

overlay_nearest('layer_2_name', max_distance:=0.1)

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.