Description Usage Arguments Value Author(s) Examples
Compute vegetation indices from remote sensing data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | 
red | 
 red channel (band) data  | 
nir | 
 nir channel (band) data  | 
blue | 
 blue channel (band) data  | 
green | 
 green channel (band) data  | 
ch5 | 
 fifth channel (band) data  | 
ch7 | 
 seventh channel (band) data  | 
slslope | 
 value of soil line slope  | 
vegetation index
Yann Chemin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  | ## Not run: 
#MODIS NDVI processing example
#Create RasterLayer objects
red <- raster( system.file("external/MOD09A1_b1.tif", package="RemoteSensing"))
nir <- raster( system.file("external/MOD09A1_b2.tif", package="RemoteSensing"))
#Set NA values before reading
NAvalue(red) <- -28672
NAvalue(nir) <- -28672
NDVI <- overlay(red, nir, fun=ndvi)
#Plot the raster output
plot(NDVI, col=grey(0:255/255))
#add Philippines country boundary
#phl <- getData('gadm', country="PHL", level=0)
#plot(phl, add=T, border="red")
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.