[postgis-users] ST_ClusterDBSCAN for "geography" data type?

Marco Boeringa marco at boeringa.demon.nl
Mon Dec 21 03:25:17 PST 2020


Hi Giuseppe,

Thanks for confirming what I already suspected, and that "geography" is 
not supported.

Maybe, as a first step to implementing this, just assuming the globe is 
a perfect sphere instead of spheroid, would help in easing implementing 
something like this for "geography", and provide significant performance 
benefits as well. Since 'ST_ClusterDBSCAN' is already a non 
deterministic process, the error of assuming the globe is a sphere is 
not particularily relevant I think, but would allow you to run the 
clustering process against a global data set.

Marco

Op 21-12-2020 om 12:15 schreef Giuseppe Broccolo:
> Hi Marco,
>
> Il giorno dom 20 dic 2020 alle ore 10:03 Marco Boeringa 
> <marco at boeringa.demon.nl <mailto:marco at boeringa.demon.nl>> ha scritto:
>
>     Hi,
>
>     Reading through the PostGIS documentation, I noticed the
>     "ST_ClusterDBSCAN" function takes a distance as one of the inputs.
>     Now
>     the docs suggest the current algorithm only takes in "geometry" type
>     data. Is that true? Based on the distance input variable, it would
>     seem
>     logical to have a "geography" variant as well, even if that is a
>     considerably slower variant considering the more complex distance
>     calculation.
>
>
> Yes, ST_ClusterDBSCAN takes just the geometry type in input. This is 
> because most of the algorithm
> is implemented using utilities already existing in GEOS for planar 
> geometries.
>
> Adding the support for the geography type would mean to re-implement 
> the algorithm specifically for
> spherical objects, as you mentioned.
>
> Regards,
> Giuseppe.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201221/0cafd56e/attachment.html>


More information about the postgis-users mailing list