I would like to know the distance between polygons in a layer.

The goal is to know which houses are within 5 meters from each other in order to cluster them.

I tried adding a buffer and playing around it but I didn't manage to get what I want.

enter image description here

  • Try v.cluster with dbscan.
    – geozelot
    Jul 29, 2021 at 11:56
  • Thank you !!!!!!!!!!!! it works
    – AchB
    Jul 29, 2021 at 11:59
  • 2
    Glad it helped! I don't have the time myself, so maybe add your exact solution as an answer to this question, and accept (yes, you can do that) to successfully resolve this post.
    – geozelot
    Jul 29, 2021 at 12:08
  • finally i used another solution, found somewhere in the internet, using the NNjoin plugin, but your proposition works as well, i will gladly post a solution in a few !!
    – AchB
    Jul 29, 2021 at 12:36

1 Answer 1


The solution is quiet straightforward : Using the NNjoin plugin i made a self join of the house layer using the distance criterion enter image description here

the result layer gives the distance between the houses! enter image description here

a simple query gives all the houses within a 5 meter distance "distance" <= 5

An alternative solution can be to use the v.cluster from the grass toolbox !

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.