[postgis-users] Help with finding multi-variate clusters

Paul Ramsey pramsey at refractions.net
Tue Jul 12 15:51:17 PDT 2005


Skip PostGIS and look into R. If you can find a function in R to do  
it, load PL/R into PostgreSQL and pipe the results of a PostGIS query  
into the R function.

select rfunction(x(thepoint),y(thepoint),timestamp) from foo

Or something like that.

Or, write your own k-means clustering system. V. v. computationally  
expensive for large sets though.

P

On 12-Jul-05, at 2:16 PM, Eli Dylan Lorimer wrote:

> Hello PostGIS Folks,
>
> I'm trying to leverage the power of the spatial database to help me  
> find 3-dimensional clusters in my data. Specifically, in one table  
> I have a 2D point field and a timestamp attribute field. I want to  
> treat the data from each of these 2 fields as a 3D point (x,y,z)  
> and over and entire table, find clusters given a specific tolerance  
> (perhaps a mean nearest neighbor). To be honest, I'm not too fussed  
> with the clustering algorithm, anything simple will do for now.  
> What I'd like is to make my query and get in return a result set  
> consisting of points defining the center of each of the clusters. I  
> want to then draw them client side using Java3D. In any event, I  
> figure this is possible with PostGIS but I have no idea where to  
> begin looking. Could anyone point me in the right direction (or  
> perhaps this functionality already exists and I'm not seeing it in  
> the documentation.)
>
> I'm very grateful for you help. This is a part of a big Uni project.
>
> Cheers.
> ./dylan
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>




More information about the postgis-users mailing list