1: I wish to create a mean coordinate for a group of points. However, I would like the new point to be snapped to the nearest point from the set of points used to generate it.

How might one go about this, if at all possible?

2: I have come to the stage where I have many shapefiles I wish to create mean coordinates for. Is it possible to make QGIS generate these all in one go? As opposed to manually generating the coordinate through inputting one shapefile at a time.

1 Answer 1


A very simple approach would be to do it in a couple of steps. First calculate the mean coordinate and then use that to select the nearest point from the original layer and save that as your new "mean".

EDIT (more detail):
Use Vector->Analysis Tools->Mean Coordinates to calculate your actual mean point. Then you may be able to merely pick the point manually if it is obvious. Alternatively go use Vector->Analysis Tools->Distance Matrix tool to identify the nearest point(s). The output of the distance matrix tool is a table. I'd go this way if you have a lot of clusters each with their own mean. You can then do a table join back to your points and select the points with the smallest value in the distance field from the join table for each cluster. Whether you do the selection manually or by the distance matrix method, you then just save your selection as a new dataset.

  • Thank you for your answer. Could you elaborate on the process please. I am very new to QGIS and haven't had much time practising the functions!
    – Rob Lodge
    Commented Sep 13, 2013 at 8:50
  • NP. See my edits. Commented Sep 13, 2013 at 10:23
  • Great stuff, I've gone the manual route since the process requires some degree of subjectivity anyway. Thanks for your time.
    – Rob Lodge
    Commented Sep 13, 2013 at 10:27
  • Any idea why when i join the attribute table to the layer some of the values in the column are being entered as NULL? cheers
    – Rob Lodge
    Commented Sep 24, 2013 at 11:58
  • The usual reason is that there is no matching value in the join table Commented Sep 24, 2013 at 12:51

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.