I have a map with many duplicate points and I want to combine those points together into one, based on the name and geographical location (10 meters), is there a way to do this with QGIS, given that I tried the following method:

Aggregate > GROUP_BY= geom_to_wkb($geometry)

enter image description here

When doing this, the application merged the duplicate points in the exact same place and did not work within 10 meters

Is there a solution to do this on QGIS?

enter image description here

  • Thank you I forgot about that, I added a screenshot, if there is a better way to group it by Name/Geolocation (10m)/Average distance between duplicate points Commented Sep 28, 2022 at 15:53

1 Answer 1


I'm not sure if this is best, but I think it will work. I wasn't able to find a plugin or other way to accomplish all your requirements.

  1. DBSCAN enter image description here

  2. Calculate field with a value of Name plus CLUSTER_ID. Expression something like this,


  3. Mean Coordinate(s) with Unique field being your Calculated field.

  4. Join the mean coordinate output with your previous output to get the attributes merged. You can export as well to have a unified layer.

  • Thank you very much for this great solution and I added a step which is I filled the nulls values in the CLUSTER_ID column with: if("CLUSTER_ID" is null,rand(200000,900000), "CLUSTER_ID") This is because names that are very far from each other may match and are calculated in Mean Coordinate(s) Regards Commented Sep 29, 2022 at 14:29
  • Glad it worked. A wildly random number is a neat solution for the null values. Very quick. For a cleaner solution, have a look at QGIS project variables. You could set and increment a variable similar what's described here, gis.stackexchange.com/questions/222494/…
    – cndnflyr
    Commented Sep 29, 2022 at 15:14
  • Yes, it is not a clean solution, but the nulls I had were few and it was suitable for me, and I did not know a way to do otherwise, I remember in Excel you can put a number and then increment it and it does not repeat. Commented Sep 30, 2022 at 5:05

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.