I have a question of something I actually thought was pretty simple...I have a few points around a centre point. Now I want to know the distance from each point to the centre point. Is it possible to do this without using the simple measurement tool. I mean, is there something that gives me "automatically" all the distances with just one query.
2 Answers
You can use the Distance Matrix function:
(from QGIS 2.2)
Vector > Analysis Tools > Distance matrix
or select it from Processing Toolbox
Select the same point layer and it will calculate the distances between each point. You can then simply scroll or filter out your centre point to see the distances from the centre point to all the others in the layer.
-
you'll find distance matrix moved in Processing Toolbox Commented Sep 22, 2014 at 13:18
-
Thanks @LuigiPirelli, I should have mentioned that I was using QGIS 2.2 so the Distance matrix function is available from both the interface menu and the Processing Toolbox– JosephCommented Sep 22, 2014 at 13:25
what do you mean with one query?
try to create a command/script using this suggestion:
get the geometry for the center feature and use QgsGeometry.distance() method http://qgis.org/api/classQgsGeometry.html#a9971f1e9c56cdf57c06017ec64e70151 looping to all other point geometries
regards