Need an algorithm to identify spatial clusters
On Tue, Apr 14, 2009 at 5:26 PM, Mark Andersen <manderse at nmsu.edu> wrote:
Hello, all,
I am currently interested in simulating the initiation and spread of forest
fires in simulated landscapes consisting of 2 tree species (a native and an
invasive). I'm simulating fire seasons of fixed length; fires can start at
any time and in either tree species during this fire season, and spread
through the simulated forest according to a simple percolation-like process.
I have developed the algorithms for this in Matlab, and don't anticipate any
problems converting them to R if I need to.
However, it's the next task that has me at a loss. At the end of each fire
season, there will be several burned patches on the simulated landscape; the
number of these patches won't necessarily correspond to the total number of
fires that season, because fires may coalesce. I need to count how many of
these burned patches there are, and find the size of each. It seems that
there should be an algorithm available to do this, but I haven't found one,
possibly because I haven't been using the right search criteria. I used
RSiteSearch("spatial cluster"), and got many references to the spatclus
package. However, from the spatclus documentation it appears that this is
not quite what I'm looking for. Spatclus looks like it picks out potential
clusters of occurrence of some phenomenon (such as earthqukes or cancer); I
need something that will delineate clusters of contiguous pixels with the
same value (i.e., burned in my simulations). Could anyone point me towards
such an algorithm, or help me get started finding one?
This kind of analysis of gridded data comes into the area of Image Analysis. A quick search reveals EBImage, which is part of Bioconductor, might be able to do what you want. It's possibly related to image segmentation techniques, where you break an image up into areas. The EBImage docs show an example of identifying cell nuclei in a microscope slide image. Your task is a bit easier since you've probably already got an easy way of identifying burnt cells, whereas with the microscope image they have to carefully set a threshold first... Barry