I have two shapefiles containing each one set of points, set A and set B. One set is my random selection (set A), the other is a list of communities (set B).

For each point of the random selection (set A) I want to find the nearest point pertaining to

  • is your set B a list of centroids?
    – Kurt
    Sep 16, 2012 at 9:02

2 Answers 2


You could use GRASS' v.distance via the Sextante plugin. It calculates all these distances.


The GRASS v.distance function should do the job, but it does not work through QGIS Processing. It can, however, be used through the QGIS GRASS plugin.

Other easily available alternatives in QGIS are Distance matrix (under Vector-> Analysis Tools) and the NNJoin plugin.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.