msavi {ASIP} | R Documentation |
Modified Soil Adjusted Vegetation Index (MSAVI) is a vegetation index. Advantage of this index is that, it increases the dynamic range of the vegetation signal while further minimizing the soil background influences, resulting in greater vegetation sensitivity as defined by a 'vegetation signal' to 'soil noise' ratio.
msavi(directory = getwd(), crop = "n", ext2crop = "none")
ext2crop , crop , directory |
Same as mentioned in |
Computed MSAVI product
1. MSAVI=((2r_nir + 1) - ((2r_nir + 1)^2 - 8(r_nir - r_red))^0.5)/2
where, "r_" denotes TOA reflectance band.
Other important notes are mentioned in custom.eqn
.
library (raster)
library (rgdal)
# Finding the path of the sample satellite image directory.
# User may define paths directly like "/home/ur_folder" or "C:/ur_folder"
path <- system.file ("TM_sample", package = "ASIP")
shapefil <- paste0 (path, "/test.shp")
op <- msavi (directory = path, crop = "y", ext2crop = shapefil)