finding clusters of gridded points, distinguished by group
On 19/12/10 14:06:01, Malcolm Fairbrother wrote:
I have SpatialPointsDataFrame type data, with a few hundred observations scattered around the globe, and am trying to identify points that are both (a) neighbours, and (b) of the same group. In other words, within a group, there may be geographically non-contiguous clusters, and geographically contiguous clusters may contain one or more groups.
Hi Malcolm, that sounds like an interesting task for something like spatial clustering. I've been working on something similar in precision agriculture and it seems that there was no existing algorithm which was able to solve my problem. See [1], [2] for my publications on that (fulltext under pdf icon), maybe the references and/or the figures given in those articles are useful. What I essentially did was something like multivariate region-growing or merging clustering. You start with a few of the spatial data points, e.g. those having different classes. Then you look into those points' spatial neighbors and see whether there are points having the same class. If yes, update that point/cluster and (!) update the neighbor list. Merging two or more points with the same class gives you a larger cluster and a possibly bigger neighbor list. Then you repeat the search. Once there's no more spatially adjacent clusters/points of the same class, you're done. You may have some points left, but I'm not sure about the special data or points you're dealing with and I'm not quite clear what your expected outcome is. But you're not dealing with multivariate data, as I understand it, so some things could be easier to handle than in my approach. [1] http://fuzzy.cs.uni-magdeburg.de/aigaion/index.php/publications/show/772 [2] http://fuzzy.cs.uni-magdeburg.de/aigaion/index.php/publications/show/773
I realise the following will get me a neighbours list: dnearneigh(g, d1=0, d2=sqrt(2))
This requires > library("spdep"), btw. :-)
Regards,
Georg.
--
Research Assistant
Otto-von-Guericke-Universit?t Magdeburg
research at georgruss.de
http://research.georgruss.de