Description Usage Arguments Details Value References Examples
varSAVI
Calculate the soil-adjusted vegetation index (SAVI) from the
red and near-infrared (NIR) bands.
1 2 3 |
red |
a |
nir |
a |
L |
a constant to remove soil background effect. A value of 0.5 is recommended in the literature. |
scfun |
a function to re-scale the original pixel values into reflectance (0-1). |
The soil adjusted vegetation index (SAVI) is an indicator engineered to remove
the influence of the soil background effect \insertCitehuete1988soilRGISTools.
This function is used within ls7FolderToVar
,
ls8FolderToVar
, modFolderToVar
and
senFolderToVar
.
A SAVI image in raster
format.
huete1988soilRGISTools
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # path to the cropped and cutted MODIS images for the region of Navarre
wdir <- system.file("ExNavarreVar", package = "RGISTools")
# list all the tif files
files.mod <- list.files(wdir, pattern="\\.tif$", recursive = TRUE, full.names = TRUE)
# print the MOD09 bands
getRGISToolsOpt("MOD09BANDS")
# select the red and NIR bands
img.mod.red <- raster(files.mod[1])
img.mod.nir <- raster(files.mod[2])
# calculate the SAVI image
img.mod.savi <- varSAVI(img.mod.red,img.mod.nir,scfun=getRGISToolsOpt("MOD09SCL"))
# plot the image
spplot(img.mod.savi,col.regions=rev(topo.colors(20)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.