ee_Image_spectralIndex: Spectral Indices Computation

View source: R/ee_Image.R

ee_Image_spectralIndexR Documentation

Spectral Indices Computation

Description

Computes one or more spectral indices for an ee$Image or an ee$ImageCollection object.

Usage

`ee$Image$Extra_spectralIndex(x, ...)`

Arguments

x

An ee$Image or an ee$ImageCollection to compute indices on.

...

Additional arguments passed to the underlying spectral index computation function. See details for a complete list of possible arguments.

Details

The ... argument can include any of the following:

  • indexCharacter. Index or list of indices to compute. Options include 'vegetation', 'burn', 'water', 'snow', 'drought', 'urban', 'kernel', and 'all'. Default 'NDVI'.

  • GNumeric. Gain factor for 'EVI'. Default 2.5.

  • C1, C2Numerics. Coefficients for aerosol resistance in 'EVI'. Defaults are 6.0 and 7.5.

  • LNumeric. Canopy background adjustment for 'EVI' or 'SAVI'. Default 1.0.

  • cexpNumeric. Coefficient for 'OCVI'. Default 1.16.

  • nexpNumeric. Exponent for 'GDVI'. Default 2.0.

  • alphaNumeric. Weighting coefficient for 'WDRVI'. Default 0.1.

  • slope, interceptNumerics. Soil line slope and intercept. Defaults are 1.0 and 0.0.

  • gammaNumeric. Weighting coefficient for 'ARVI'. Default 1.0.

  • kernelCharacter. Kernel type for kernel indices. Options are 'linear', 'RBF', and 'poly'. Default 'RBF'.

  • sigmaCharacter or Numeric. Length-scale parameter for RBF kernel. Default '0.5 * (a + b)'.

  • pNumeric. Kernel degree for polynomial kernel. Default 2.0.

  • cNumeric. Free parameter for polynomial kernel. Default 1.0.

  • onlineLogical. Whether to retrieve the most recent list of indices online. Default FALSE.

  • dropLogical. If TRUE, drop the image bands after calculation. Default TRUE.

For a complete list of indices and their parameters, please refer to the spectral indices documentation.

Value

An ee$Image or an ee$ImageCollection with the computed spectral index, or indices, as new bands.

Examples

## Not run: 
library(rgee)
library(rgeeExtra)

ee_Initialize()
extra_Initialize()

s2_indices <- ee$ImageCollection("COPERNICUS/S2_SR") %>%
  ee$ImageCollection$first() %>%
  ee$Image$Extra_preprocess() %>%
  ee$Image$Extra_spectralIndex(c("NDVI", "SAVI"))

names(s2_indices)
# "NDVI" "SAVI"

## End(Not run)

r-earthengine/rgeeExtra documentation built on Dec. 7, 2023, 9:03 p.m.