<div dir="ltr">Hi,<div><br></div><div>My last exercise in KMeans showed that it's enough to add support for 3D distances instead of 2D distances in the code and transform your geometry into EPSG:4978 (after Force3D). That will cluster in a 3D XYZ coordinate system using straight lines in 3D, which is usually good enough.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 21, 2020 at 2:15 PM Giuseppe Broccolo <<a href="mailto:g.broccolo.7@gmail.com">g.broccolo.7@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Marco,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno dom 20 dic 2020 alle ore 10:03 Marco Boeringa <<a href="mailto:marco@boeringa.demon.nl" target="_blank">marco@boeringa.demon.nl</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Reading through the PostGIS documentation, I noticed the <br>
"ST_ClusterDBSCAN" function takes a distance as one of the inputs. Now <br>
the docs suggest the current algorithm only takes in "geometry" type <br>
data. Is that true? Based on the distance input variable, it would seem <br>
logical to have a "geography" variant as well, even if that is a <br>
considerably slower variant considering the more complex distance <br>
calculation.<br></blockquote><div><br></div><div>Yes, ST_ClusterDBSCAN takes just the geometry type in input. This is because most of the algorithm</div><div>is implemented using utilities already existing in GEOS for planar geometries.</div><div><br></div><div>Adding the support for the geography type would mean to re-implement the algorithm specifically for</div><div>spherical objects, as you mentioned.</div><div><br></div><div>Regards,</div><div>Giuseppe.<br></div></div></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Darafei "Komяpa" Praliaskouski<br>OSM BY Team - <a href="http://openstreetmap.by/" target="_blank">http://openstreetmap.by/</a><br></div></div>