vvi: Visible vegetation index

Description Usage Arguments Value Author(s) References Examples

View source: R/vvi.R

Description

This function calculates a visible vegetation index (VVI) from a RGB Raster* object.

Usage

1
vvi(rgb, r = 1, g = 2, b = 3)

Arguments

rgb

A RasterStack or RasterBrick object. 3 bands are mandatory (usually red, green and blue).

r

Integer, defaults to '1'. Index of the red channel.

g

Integer, defaults to '2'. Index of the green channel.

b

Integer, defaults to '3'. Index of the blue channel.

Value

A VVI RasterLayer.

Author(s)

Florian Detsch, Tim Appelhans

References

Planetary Habitability Laboratory (2015): Visible Vegetation Index (VVI). Available online via http://phl.upr.edu/projects/visible-vegetation-index-vvi.

Examples

1
2
3
4
5
6
7
library(RColorBrewer)

data(gmap_hel)
plotRGB(gmap_hel)

gmap_hel_veg <- vvi(gmap_hel)
plot(gmap_hel_veg, col = brewer.pal(5, "BrBG"), alpha = .5, add = TRUE)

envima/Rsenal2 documentation built on Oct. 16, 2020, 7:14 p.m.