1

If I made a buffer around points and I am uniting those buffers that are in contact with each other.

Now I want to make an attribute column in those united buffers that tells me what points are inside each buffer. Each point has an ID code.

2
  • A spatial join will allow you to identify the polygon each point is in. But turning that around results in a one-to-many, which results in a list, and lists are bad relational design (antipattern). Commented Mar 9 at 20:12
  • What should I do when someone answers my question? Commented Mar 27 at 13:25

1 Answer 1

3

First, buffer the points and dissolve the buffers. Then use the tool "Multiparts to singleparts" from the toolbox. Optional: add a new ID field using the field calculator and as value $id. This results in an attribute with an autoincrement ID for each new feature and it is easier to identify/use the buffer features in subsequent steps.

Second, in the buffer layer (with individual features) add a new field (data type: 'Text') using the field calculator and enter the following:

array_to_string(
    overlay_intersects('pts', "id"),
    ', '
)

Here, 'pts' is the name of your point layer and "id" is the name of your ID field in said layer. Here are the results with my test data:

enter image description here

1
  • 3
    The Multiparts to singleparts tool can be skipped if the option 'Keep disjoint results separate' is checked on in the Buffer tool. Commented Mar 10 at 17:10

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.