eemont.imagecollection.index¶
- eemont.imagecollection.index(self, 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, kernel='RBF', sigma='0.5 * (a + b)', p=2.0, c=1.0, online=False)[source]¶
Computes one or more spectral indices (indices are added as bands) for an image collection.
Warning
Pending Deprecation: The
index()
method will no longer be available for future versions. Please usespectralIndices()
instead.Tip
Check more info about the supported platforms and spectral indices in the User Guide.
- Parameters
self (ee.ImageCollection) – Image collection to compute indices on. Must be scaled to [0,1].
index (string | list[string], default = 'NDVI') –
Index or list of indices to compute.
- Available options:
’vegetation’ : Compute all vegetation indices.
’burn’ : Compute all burn indices.
’water’ : Compute all water indices.
’snow’ : Compute all snow indices.
’drought’ : Compute all drought indices.
’kernel’ : Compute all kernel indices.
’all’ : Compute all indices listed below.
- Vegetation indices:
’BNDVI’ : Blue Normalized Difference Vegetation Index.
’CIG’ : Chlorophyll Index - Green.
’CVI’ : Chlorophyll Vegetation Index.
’EVI’ : Enhanced Vegetation Index.
’EVI2’ : Two-Band Enhanced Vegetation Index.
’GARI’ : Green Atmospherically Resistant Vegetation Index.
’GBNDVI’ : Green-Blue Normalized Difference Vegetation Index.
’GEMI’ : Global Environment Monitoring Index.
’GLI’ : Green Leaf Index.
’GNDVI’ : Green Normalized Difference Vegetation Index.
’GRNDVI’ : Green-Red Normalized Difference Vegetation Index.
’GVMI’ : Global Vegetation Moisture Index.
’MNDVI’ : Modified Normalized Difference Vegetation Index.
’NDVI’ : Normalized Difference Vegetation Index.
’NGRDI’ : Normalized Green Red Difference Index.
’RVI’ : Ratio Vegetation Index.
’SAVI’ : Soil-Adjusted Vegetation Index.
’VARI’ : Visible Atmospherically Resistant Index.
- Burn and fire indices:
’BAI’ : Burned Area Index.
’BAIS2’ : Burned Area Index for Sentinel 2.
’CSIT’ : Char Soil Index Thermal.
’NBR’ : Normalized Burn Ratio.
’NBRT’ : Normalized Burn Ratio Thermal.
’NDVIT’ : Normalized Difference Vegetation Index Thermal
’SAVIT’ : Soil-Adjusted Vegetation Index Thermal.
- Water indices:
’MNDWI’ : Modified Normalized Difference Water Index.
’NDWI’ : Normalized Difference Water Index.
- Snow indices:
’NDSI’ : Normalized Difference Snow Index.
- Drought indices:
’NDDI’ : Normalized Difference Drought Index.
- Kernel indices:
’kEVI’ : Kernel Enhanced Vegetation Index.
’kNDVI’ : Kernel Normalized Difference Vegetation Index.
’kRVI’ : Kernel Ratio Vegetation Index.
’kVARI’ : Kernel Visible Atmospherically Resistant Index.
G (float, default = 2.5) – Gain factor. Used just for index = ‘EVI’.
C1 (float, default = 6.0) – Coefficient 1 for the aerosol resistance term. Used just for index = ‘EVI’.
C2 (float, default = 7.5) – Coefficient 2 for the aerosol resistance term. Used just for index = ‘EVI’.
L (float, default = 1.0) – Canopy background adjustment. Used just for index = [‘EVI’,’SAVI’].
cexp (float, default = 1.16) – Exponent used for OCVI.
nexp (float, default = 2.0) – Exponent used for GDVI.
alpha (float, default = 0.1) – Weighting coefficient used for WDRVI.
slope (float, default = 1.0) – Soil line slope.
intercept (float, default = 0.0) – Soil line intercept.
kernel (str, default = 'RBF') –
Kernel used for kernel indices.
- Available options:
’linear’ : Linear Kernel.
’RBF’ : Radial Basis Function (RBF) Kernel.
’poly’ : Polynomial Kernel.
sigma (str | float, default = '0.5 * (a + b)') – Length-scale parameter. Used for kernel = ‘RBF’. If str, this must be an expression including ‘a’ and ‘b’. If numeric, this must be positive.
p (float, default = 2.0) – Kernel degree. Used for kernel = ‘poly’.
c (float, default = 1.0) – Free parameter that trades off the influence of higher-order versus lower-order terms in the polynomial kernel. Used for kernel = ‘poly’. This must be greater than or equal to 0.
online (boolean, default = False) –
Wheter to retrieve the most recent list of indices directly from the GitHub repository and not from the local copy.
New in version 0.2.0.
- Returns
Image collection with the computed spectral index, or indices, as new bands.
- Return type
ee.ImageCollection
See also
scale
Scales bands on an image collection.
Examples
>>> import ee, eemont >>> ee.Authenticate() >>> ee.Initialize() >>> S2 = ee.ImageCollection('COPERNICUS/S2_SR').scale()
Computing one spectral index:
>>> S2.index('NDVI')
Computing indices with different parameters:
>>> S2.index('SAVI',L = 0.5)
Computing multiple indices:
>>> S2.index(['NDVI','EVI','GNDVI'])
Computing a specific group of indices:
>>> S2.index('vegetation')
Computing kernel indices:
>>> S2.index(['kNDVI'],kernel = 'poly',p = 5)
Computing all indices:
>>> S2.index('all')