When adding a point, I'd like to auto-populate one of its fields (the street address) setting it to a field in the nearest point in another layer (a layer containing all existing addresses).

It looks like the Value Relation edit widget could do the trick, if I could figure out how to use the buffer() function.

Right now, I can get the list of all addresses by selecting the Layer, Key column and Value column. I thought I could filter that list so that it has only nearby points (ideally just one), using something like:

within($geometry_A, buffer($geometry_B,50)) = 1

where $geometry_A is the new point and $geometry_B is the existing point.

$x, $y and $geometry seem to refer to the existing points in the selected Layer.

Assuming I am on the right track, how do I refer to the geometry of the new point (i.e. $geometry_A)?


Your Answer

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

Browse other questions tagged or ask your own question.