ee_Image_spectralIndex | R Documentation |
Computes one or more spectral indices for an ee$Image or an ee$ImageCollection object.
`ee$Image$Extra_spectralIndex(x, ...)`
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. |
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.
An ee$Image or an ee$ImageCollection with the computed spectral index, or indices, as new bands.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.