This is my project:


I want to convert all points that touch each other into polygons, something like this (I know I missed some of them):


I tried using dissolve and convex hull to do that, but they didn't work as intended. Also, this is just a fraction of the whole project, so I don't know how many clusters there should be. Hence, I can't run k-means.

Unfortunately, I don't know anything about PostGIS. Does anyone know how to do this?

  • 3
    Looks like a very small buffer and Dissolve might do the trick. – Jon Sep 22 '20 at 20:10
  • 3
    The points don't actually touch, they are just rendered with circles that visually touch. Do the points represent an area (data-wise)? Circular or square? – bugmenot123 Sep 22 '20 at 20:16
  • They represent square-ish areas – will Sep 22 '20 at 20:26
  • It doesn't matter what shape the points are rendered as, buffer by more than half the gap between points, dissolve then buffer by negative the same size to trim the unjoined back to fairly close to the generating points. – Michael Stimson Sep 23 '20 at 0:03

This will work when each cluster has an attribute that defines it.

If there is no such attribute, you can achieve it by means of "DBSCAN clustering" geoalgorithm.

Clusters point features based on a 2D implementation of Density-based spatial clustering of applications with noise (DBSCAN) algorithm.

The algorithm requires two parameters, a minimum cluster size ("minPts"), and the maximum distance allowed between clustered points ("eps").

Let's assume there is a point layer called 'pois', see image below.


Use the "Minimum bounding geometry"` geoalgorithm from the QGIS's Toolbox and get the output



Managed to do it with the "Rectangles, Ovals, Diamonds (Variable)" tool. I used a rectangle with a small width and height (0.7) and then dissolved the result.

  • Looking at your screenshot, some of the point clumps don't really match a rectangle. What if a different shape, such as oval had been a better choice for a particular clump? Furthermore, even if a rectangle had been a good choice for a particular clump, what if it could be improved by rotation? Your answer would be improved if you edited it to show the results, using the same area as in your question's screenshot. – Stu Smith Jan 1 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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