[postgis-users] ST_ClusterDBSCAN: is it deterministic?

Giuseppe Broccolo g.broccolo.7 at gmail.com
Fri Jan 22 07:00:17 PST 2021


Hello,

I have a question about how the function ST_ClusterDBSCAN is implemented in
PostGIS: basically, the question is if I'm able to pass the same window of
geometries in input to the function, would it return the same clusters?

I tried to find an answer by myself having a look to the code: see link here
<https://github.com/postgis/postgis/blob/962ef92215fdac72b317d7d99201931394174afa/postgis/lwgeom_window.c#L8>

What I understood is that the geometries in the window are accessed exactly
as they are stored in memory. The geometries are then processed
sequentially in order to create the clusters.

Is there a way to create a window in a way that passing exactly the same
geometries in the window I can obtain exactly the same clusters (i.e.
sorting the window partition with an ORDER BY or any similar trick)?

Thank you very much,
Giuseppe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210122/917ddf42/attachment.html>


More information about the postgis-users mailing list