Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
is your set B a list of centroids? – Kurt Sep 16 '12 at 9:02

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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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