I have a point layer in QGIS, which I want to filter by attribute values of a specific attribute column. For each unique attribute value, a centroid should be calculated from the respective features. This results in one centroid for each set of features containing a unique attribute value.

Example: In the attribute column 'names', I have 10 features named 'aaa', 20 features named 'bbb', and so on. Now I want to create a centroid of the respective 10 'aaa' features, another centroid of the respective 20 'bbb' features, etc.

Anyone has some hints on how to do this?

  • 1
    To be sure of your problem, do you want create centroids of the features grouped by attribute?
    – Val P
    Commented Feb 25, 2020 at 14:51
  • Yes, grouped by attribute is another good description. The answer below exactly did what I needed!
    – LeonardH
    Commented Feb 25, 2020 at 15:04

1 Answer 1


Please have a look at the mean coordinates tool. This should do exactly what you need.

enter image description here

Hand the tool a layer, maybe add a weighting value, and (this is important for you) tell the tool, which column contains your group IDs.

  • This worked perfectly! Exactly what I was looking for. Thank you so much!
    – LeonardH
    Commented Feb 25, 2020 at 15:04

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.