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.


You can use the Distance Matrix function:

(from QGIS 2.2)

Vector > Analysis Tools > Distance matrix

or select it from Processing Toolbox

Distance matrix

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 – Luigi Pirelli Sep 22 '14 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 – Joseph Sep 22 '14 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


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.