<div dir="ltr"><div><div><div><div>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></div>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">http://gis.stackexchange.com/q/94203</a> )<br><br></div><div>(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></div><div><br></div></div>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></div>Thanks,<br>Dan<br></div>