ndvi {ASIP} | R Documentation |
Normalized Difference Vegetation Index (NDVI). It is the most widely used satellite image derived index emphasizing on vegetation mapping. This function can also be used to obtain the ground emissivity as well.
ndvi(directory = getwd(), crop = "n", ext2crop = "none",
op_directory = directory, emissivity = "n")
ext2crop , crop , directory |
Same as mentioned in |
op_directory |
Specify the output directory (within double quotes). By default the input satellite image directory will be selected as the output directory. |
emissivity |
Assign value "y" to get the emissivity of the surface as a seperate raster file. |
File named ndvi_'date of satellite image acqisition'.tif in the input folder
1. NDVI= (r_nir - r_red)/(r_nir + r_red)
where, "r_" denotes TOA reflectance band.
2. Emissivity is calculated according to Van De Griend and Owe (1993).
3. Emissivity values will be absent on pixels with negative NDVI values. This can affect the land surface temperature results (not at-sensor brightness temperature) as well. So, please review the study region and the requirements before using this function.
4. 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")
ndvi (directory = path, crop = "y", ext2crop = shapefil)