geetools.ImageCollectionAccessor.spectralIndices#
- geetools.ImageCollectionAccessor.spectralIndices(index='NDVI', G=2.5, C1=6.0, C2=7.5, L=1.0, cexp=1.16, nexp=2.0, alpha=0.1, slope=1.0, intercept=0.0, gamma=1.0, omega=2.0, beta=0.05, k=0.0, fdelta=0.581, kernel='RBF', sigma='0.5 * (a + b)', p=2.0, c=1.0, lambdaN=858.5, lambdaR=645.0, lambdaG=555.0, online=False)#
Computes one or more spectral indices (indices are added as bands) for an image from the Awesome List of Spectral Indices.
- Parameters:
self – Image to compute indices on. Must be scaled to [0,1].
index (str) –
Index or list of indices to compute, default = ‘NDVI’ Available options:
’vegetation’ : Compute all vegetation indices.
’burn’ : Compute all burn indices.
’water’ : Compute all water indices.
’snow’ : Compute all snow indices.
’urban’ : Compute all urban (built-up) indices.
’kernel’ : Compute all kernel indices.
’all’ : Compute all indices listed below.
Awesome Spectral Indices for GEE: Check the complete list of indices here.
G (geetools.types.number) – Gain factor. Used just for index = ‘EVI’, default = 2.5
C1 (geetools.types.number) – Coefficient 1 for the aerosol resistance term. Used just for index = ‘EVI’, default = 6.0
C2 (geetools.types.number) – Coefficient 2 for the aerosol resistance term. Used just for index = ‘EVI’, default = 7.5
L (geetools.types.number) – Canopy background adjustment. Used just for index = [‘EVI’,’SAVI’], default = 1.0
cexp (geetools.types.number) – Exponent used for OCVI, default = 1.16
nexp (geetools.types.number) – Exponent used for GDVI, default = 2.0
alpha (geetools.types.number) – Weighting coefficient used for WDRVI, default = 0.1
slope (geetools.types.number) – Soil line slope, default = 1.0
intercept (geetools.types.number) – Soil line intercept, default = 0.0
gamma (geetools.types.number) – Weighting coefficient used for ARVI, default = 1.0
omega (geetools.types.number) – Weighting coefficient used for MBWI, default = 2.0
beta (geetools.types.number) – Calibration parameter used for NDSIns, default = 0.05
k (geetools.types.number) – Slope parameter by soil used for NIRvH2, default = 0.0
fdelta (geetools.types.number) – Adjustment factor used for SEVI, default = 0.581
kernel (str) –
Kernel used for kernel indices, default = ‘RBF’ Available options:
’linear’ : Linear Kernel.
’RBF’ : Radial Basis Function (RBF) Kernel.
’poly’ : Polynomial Kernel.
sigma (str) – Length-scale parameter. Used for kernel = ‘RBF’, default = ‘0.5 * (a + b)’. If str, this must be an expression including ‘a’ and ‘b’. If numeric, this must be positive.
p (geetools.types.number) – Kernel degree. Used for kernel = ‘poly’, default = 2.0
c (geetools.types.number) – Free parameter that trades off the influence of higher-order versus lower-order terms in the polynomial kernel. Used for kernel = ‘poly’, default = 1.0. This must be greater than or equal to 0.
lambdaN (geetools.types.number) – NIR wavelength used for NIRvH2 and NDGI, default = 858.5
lambdaR (geetools.types.number) – Red wavelength used for NIRvH2 and NDGI, default = 645.0
lambdaG (geetools.types.number) – Green wavelength used for NDGI, default = 555.0
drop – Whether to drop all bands except the new spectral indices, default = False
online (geetools.types.number)
- Returns:
Image with the computed spectral index, or indices, as new bands.
- Return type:
ee.ImageCollection
Examples
import ee, geetools ee.Initialize() image = ee.Image('COPERNICUS/S2_SR/20190828T151811_20190828T151809_T18GYT') image = image.geetools.specralIndices(["NDVI", "NDFI"])