3

I have a point layer and I'm Looking for a tool wich connects every point of the layer with each other. Ideally, I can give a distance and the number of Connections for each point. The following example is from the ArcGIS tool enter image description here

In the example each point connects to 9 other points wich are within distance X Meters.

Is there a tool like that in QGIS or a Plugin. Or perhaps it can be done with geometry Generator somehow?

6

Using the distance, you could create a virtual layer that connects nearby points.

Go to the menu Layer > Add Layer > Add/Edit Virtual Layer... and enter the following query.

Note that the line is created once between 2 points (A-B is the same as B-A).

select make_line(a.geometry, b.geometry) as geometry, a.id as fromID, b.id as toID
FROM myPointLayer a
  JOIN myPointLayer b
    ON ST_Distance(a.geometry, b.geometry) < 5000 AND a.id < b.id

enter image description here

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.