How to Calculate Various Spectral Indices in Google Earth Engine Quickly?

  Рет қаралды 79

TECH HIVE

TECH HIVE

Күн бұрын

Пікірлер: 2
@omidbagheri2009
@omidbagheri2009 2 ай бұрын
hello. Is it possible please share the code.
@techhive.2023
@techhive.2023 2 ай бұрын
var s2 = ee.ImageCollection('COPERNICUS/S2_HARMONIZED'); var admin2 = ee.FeatureCollection('FAO/GAUL_SIMPLIFIED_500m/2015/level2'); var filteredAdmin2 = admin2 .filter(ee.Filter.eq('ADM2_NAME', 'Bangalore Urban')) .filter(ee.Filter.eq('ADM1_NAME', 'Karnataka')); var geometry = filteredAdmin2.geometry(); Map.centerObject(geometry); var filteredS2 = s2.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 30)) .filter(ee.Filter.date('2019-01-01', '2020-01-01')) .filter(ee.Filter.bounds(geometry)); var image = filteredS2.median(); // Calculate Normalized Difference Vegetation Index (NDVI) // 'NIR' (B8) and 'RED' (B4) var ndvi = image.normalizedDifference(['B8', 'B4']).rename(['ndvi']); // Calculate Modified Normalized Difference Water Index (MNDWI) // 'GREEN' (B3) and 'SWIR1' (B11) var mndwi = image.normalizedDifference(['B3', 'B11']).rename(['mndwi']); // Calculate Soil-adjusted Vegetation Index (SAVI) // 1.5 * ((NIR - RED) / (NIR + RED + 0.5)) // For more complex indices, you can use the expression() function // Note: // For the SAVI formula, the pixel values need to converted to reflectances // Multiplyng the pixel values by 'scale' gives us the reflectance value // The scale value is 0.0001 for Sentinel-2 dataset var savi = image.expression( '1.5 * ((NIR - RED) / (NIR + RED + 0.5))', { 'NIR': image.select('B8').multiply(0.0001), 'RED': image.select('B4').multiply(0.0001), }).rename('savi'); var rgbVis = {min: 0.0, max: 3000, bands: ['B4', 'B3', 'B2']}; var ndviVis = {min:0, max:1, palette: ['white', 'green']}; var ndwiVis = {min:0, max:0.5, palette: ['white', 'blue']}; Map.addLayer(image.clip(geometry), rgbVis, 'Image'); Map.addLayer(mndwi.clip(geometry), ndwiVis, 'mndwi'); Map.addLayer(savi.clip(geometry), ndviVis, 'savi'); Map.addLayer(ndvi.clip(geometry), ndviVis, 'ndvi');
Mapping urban density using spectral indices using Google Earth Engine || Urban density Mapping
16:11
Study Hacks-Institute of GIS & Remote Sensing
Рет қаралды 923
Wait… Maxim, did you just eat 8 BURGERS?!🍔😳| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 9 МЛН
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 13 МЛН
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 7 МЛН
Correlation with NDVI and LST using ArcGIS and Excel
12:38
GIS & RS Solution
Рет қаралды 57 М.
how to calculate NDVI using LANDSAT 8 in google earth engine
11:07
GIS & RS Professionals
Рет қаралды 10 М.
One CPU To Rule Them All - Ryzen 7 9800X3D Review
12:47
Linus Tech Tips
Рет қаралды 1,1 МЛН
How to set up RAG - Retrieval Augmented Generation (demo)
19:52
Don Woodlock
Рет қаралды 36 М.
Calculating area in Google Earth Engine ||#TECH HIVE
18:31
Supervised Classification in QGIS | Landuse Landcover Map in QGIS | SCP tool
19:55
Dawn Of Geospatial World
Рет қаралды 4,4 М.
AES: How to Design Secure Encryption
15:37
Spanning Tree
Рет қаралды 169 М.
Wait… Maxim, did you just eat 8 BURGERS?!🍔😳| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 9 МЛН