[GRASS-user] Sampling multispectral data

Ned Horning horning at amnh.org
Wed Feb 4 05:29:22 EST 2009


Greetings,

I am looking into the possibility of using GRASS with the R Random 
Forest algorithm to create a land cover classification. I read the 
Furlanello, Neteler et al. paper (very nice) and some others but I need 
some help with the details. My problem is somewhat different from the 
Furlanello, Neteler et al. paper since my sample data are coming from a 
multispectral image instead of a database. I still have to get up to 
speed with R and the Random Forest algorithm but I have an initial GRASS 
question.

What I want to do is select a number of samples representing each land 
cover type from a multispectral image. These data would then be input 
into the Random Forest model to create the classification rules. For 
example, I'm thinking that I will need to create vector polygons for 
each land cover type I'm interested in. To keep it simple for this 
explanation I'll use forest and non-forest. I'll digitize a few polygons 
that represent forest and a few more that represent non-forest. Next, I 
will need to sample the multispectral image data by selecting 500 
randomly selected pixels that fall under the forest polygons and  
another 500 pixels from under the non-forest polygons. How can I do this 
in GRASS? I suppose I can run v.random to create a vector point layer of 
random points within each land cover class (specify zmin and zmax as the 
same value?) but then how would I use the point layer to get the 
spectral information from an image group? I will also need to format the 
sample data so that R can read it.

If anyone has advice or resources they can point me to regarding the use 
of Random Forests or CART in GRASS please let me know

All the best,

Ned








More information about the grass-user mailing list