[postgis-devel] Geometry clustering functions

Daniel Baston dbaston at gmail.com
Thu Jan 15 04:14:19 PST 2015


Hello,

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.

Function #1 takes a GeometryCollection and returns the same geometries,
re-aggregated into groups of interconnected geometries (solving a question
I posted about at http://gis.stackexchange.com/q/94203 )

(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)

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.

Thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150115/729e4dac/attachment.html>


More information about the postgis-devel mailing list