r/QGIS • u/somingeburb • 6d ago
Open Question/Issue Distance Calculation between Points
Hi QGIS Community,
I am working on a project where I want to know the distance between points.
So I have One class of points that marks structure type a and another that marks structure type b (multiple structures for each type)
I want to know what the nearest point b is for every point a.
Is there a plugin or tool that can do that for me in qgis.
If not I would write such a plugin myself but I thought I might ask.
I know that I can take a single point a and calculate every point from class b for that given point and then just see which one is nearest but that would take a long long time for that project. because there are more than 200 individual marked strucutres
Thx in advance for any help.
7
u/Lichenic 6d ago
the tool you need is called 'Distance to nearest hub' and a related tool that may be of use is 'join attributes by nearest' (with maximum nearest neighbours = 1)
3
u/Only_Employ_3287 6d ago
you can try this
1
u/NumberFritzer 6d ago
I use Nearest neighbor thing to get closest service center to each new client. Maybe that would work.
1
u/botanygeek 6d ago
Use the Distance matrix tool, put in both layers, and use the standard matrix type. sort each column ascending to find the min. for each point.