<div dir="ltr"><div>ST_Cluster* is probably more clear.</div><div><br></div><div>I had been thinking of separate functions with fairly different implementations - ST_ClusterIntersecting being flexible in the types of geometries that it would take and using GEOS to run the intersection test.  For the case of ST_ClusterWithinDistance, I thought it might make sense to restrict arguments to points, and keep the implementation within lwgeom, maybe bringing in a kdtree (I currently do this work on tens of millions of points, and I'm concerned about memory footprint, maybe prematurely).</div><div><br></div><div>If these implementation differences make sense, my inclination would be to to expose these differences to the user through different function names.  I guess an alternative would be to call the appropriate backend function based on the types of arguments received.</div><div><br></div><div>Thanks,</div><div>Dan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 15, 2015 at 5:22 PM, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Do we want to go the “Accum” naming route, or introduce a “cluster” work?</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><span style="font-family:monospace">ST_ClusterWithinDistance</span></div> <div>
        
     
     
        <div>
            <br>
        </div><div>Also, since the intersecting cluster is just the withindistance with a tolerance of zero, would having just one function be good or bad?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>P.</div></font></span><span class=""><div><br></div>
        -- <br>
        Paul Ramsey<br>
        <a href="http://cleverelephant.ca" target="_blank">http://cleverelephant.ca</a><div><a href="http://postgis.net" target="_blank">http://postgis.net</a>
</div>

     
</span></div><div><div class="h5"> <br><p style="color:#000">On January 15, 2015 at 2:07:24 PM, Daniel Baston (<a href="mailto:dbaston@gmail.com" target="_blank">dbaston@gmail.com</a>) wrote:</p> <blockquote type="cite"><span><div><div></div><div>





<div dir="ltr">Glad to hear there is some interest!  I posted
some ideas to <a href="http://trac.osgeo.org/postgis/wiki/DevClusteringFunctions" target="_blank">http://trac.osgeo.org/postgis/wiki/DevClusteringFunctions</a>
<div><br></div>
<div>Thanks,</div>
<div>Dan</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 15, 2015 at 12:28 PM, Paul
Ramsey <span dir="ltr"><<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Daniel,</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
This is interesting stuff, could you post some example function
signature and input/output pictures on the wiki so we can do a
little design review. I thing it’s very exciting and am very
positive about it.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<span><font color="#888888"><br></font></span></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<span><font color="#888888">P</font></span></div>
<div>
<div><span><font color="#888888"><br></font></span></div>
<span><font color="#888888">-- <br>
Paul Ramsey<br>
<a href="http://cleverelephant.ca" target="_blank">http://cleverelephant.ca</a></font></span>
<div><span><font color="#888888"><a href="http://postgis.net" target="_blank">http://postgis.net</a></font></span></div>
</div>
<div>
<div><br>
<p style="color:#000">On January 15, 2015 at 4:14:44 AM, Daniel
Baston (<a href="mailto:dbaston@gmail.com" target="_blank">dbaston@gmail.com</a>) wrote:</p>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div><span>Hello,<br>
<br>
I'm working on a couple of C-language functions to solve some
clustering problems I frequently face in PostGIS.  I'm
wondering if there may be any level of interest in including such
functions in the project?  I would be happy to flesh these out
to include the error-handling and unit-testing that would be
required.<br>
<br></span></div>
<span>Function #1 takes a GeometryCollection and returns the same
geometries, re-aggregated into groups of interconnected geometries
(solving a question I posted about at <a href="http://gis.stackexchange.com/q/94203" target="_blank">http://gis.stackexchange.com/q/94203</a> )<br>
<br></span></div>
<div><span>(Internally this builds an STRtree using GEOS and uses a
union-find structure to identify connected components....as an
aside, I am wondering if there is some way to take advantage of a
database spatial index that may already exist)<br></span></div>
<div><span><br></span></div>
</div>
<span>Function #2 (not written) would solve a related problem - we
want to take a set of points and return a set of MultiPoints, where
each point in a MultiPoint is within distance X of some other point
in the MultiPoint.<br>
<br></span></div>
<span>Thanks,<br>
Dan<br></span></div>
</div>
</div>
<span><span>_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a></span></span></div>
</div>
</blockquote>
</div>
<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>

<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br>
</blockquote>
</div>
<br></div>


_______________________________________________
<br>postgis-devel mailing list
<br><a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>
<br><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a></div></div></span></blockquote></div></div></div><br>_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br></blockquote></div><br></div>