vegIndices: Table of vegetation indices that can be calculated from...

vegIndicesR Documentation

Table of vegetation indices that can be calculated from remote sensing surface reflectance data using vegIndex(). A near-comprehensive table of indices can be found on the Index Database: A Database for Remote Sensing Indices.

Description

A table of vegetation indices that ca be calculated using vegIndex(). Columns include:

  • 'index“: Abbreviation of the index.

  • definition: Index name

  • R, G, B, NIR, channel5, channel7: Whether or not the index uses the red, green, blue, or near-infrared channels, and channels 5 and 7.

  • soilLineslope, soilIntercept, soilNR: Whether or not the index requires soil line slope, soil intercept, and a soil noise reduction factor.

Format

An object of class data.frame.

See Also

vegIndex()

Examples


### vector data
###############

library(sf)

# For vector data, we can use data(*) or fastData(*):
data(madCoast0) # same as next line
madCoast0 <- fastData("madCoast0") # same as previous
madCoast0
plot(st_geometry(madCoast0))

madCoast4 <- fastData("madCoast4")
madCoast4
plot(st_geometry(madCoast4), add = TRUE)

madRivers <- fastData("madRivers")
madRivers
plot(st_geometry(madRivers), col = "blue", add = TRUE)

madDypsis <- fastData("madDypsis")
madDypsis
plot(st_geometry(madDypsis), col = "red", add = TRUE)

### raster data
###############

library(terra)

# For raster data, we can get the file directly or using fastData(*):
rastFile <- system.file("extdata/madElev.tif", package="fasterRaster")
madElev <- terra::rast(rastFile)

madElev <- fastData("madElev") # same as previous two lines
madElev
plot(madElev)

madForest2000 <- fastData("madForest2000")
madForest2000
plot(madForest2000)

madForest2014 <- fastData("madForest2014")
madForest2014
plot(madForest2014)

# multi-layer rasters
madChelsa <- fastData("madChelsa")
madChelsa
plot(madChelsa)

madPpt <- fastData("madPpt")
madTmin <- fastData("madTmin")
madTmax <- fastData("madTmax")
madPpt
madTmin
madTmax


# RGB raster
madLANDSAT <- fastData("madLANDSAT")
madLANDSAT
plotRGB(madLANDSAT, 4, 1, 2, stretch = "lin")

# categorical raster
madCover <- fastData("madCover")
madCover
madCover <- droplevels(madCover)
levels(madCover) # levels in the raster
nlevels(madCover) # number of categories
catNames(madCover) # names of categories table

plot(madCover)

adamlilith/fasterRaster documentation built on Sept. 23, 2024, 1:28 a.m.