A Google Earth Engine (GEE) GUI Application for Multi-Sensor Vegetation Index Computation, Thresholding, Area Statistics, and Export Developed by Defani Arman Alfitriansyah β Faculty of Forestry and Environment, Universitas Kuningan
A Google Earth Engine (GEE) GUI Application for Multi-Sensor Vegetation Index Computation, Thresholding, Area Statistics, and Export
Developed by Defani Arman Alfitriansyah β Faculty of Forestry and Environment, Universitas Kuningan
π OverviewΒΆ
This application provides a fully interactive, panel-based GUI within the Google Earth Engine Code Editor for computing spectral indices from Sentinel-2, Landsat 8, and Landsat 9 surface reflectance imagery. The tool is designed to support remote sensing research workflows including vegetation mapping, mangrove monitoring, biomass estimation proxies, and land cover analysis.
Key capabilities:
Multi-sensor support (Sentinel-2 SR, Landsat 8 SR, Landsat 9 SR)
40+ built-in spectral indices including red-edge, chlorophyll, water, and burn indices
Three computation modes: Ready-Use Index, Normalized Difference, and Raster Calculator
Live palette selection with reverse option (20 colour palettes)
Dynamic thresholding with single-bound or range-based masking
Pixel-area statistics for masked regions (in Hectares)
Export to Google Drive or GEE Asset
π Access the ApplicationΒΆ
Open the script directly in the GEE Code Editor:
https://code.earthengine.google.com/855c2692093e0ff2901447b2b9cb7814?hl=idβ οΈ A Google Earth Engine account is required. Register at earthengine
.com if you do not have access.
π₯οΈ Interface LayoutΒΆ
The interface is divided into three panels:
| Panel | Location | Function |
|---|---|---|
| Left Panel | Left side | Colour palette, thresholding, area statistics, legend |
| Map Panel | Centre | Interactive satellite basemap with rendered layers |
| Right Panel | Right side | All data controls: AOI, sensor, date, index, export |
π‘ All analysis controls are on the RIGHT panel. Visual and display controls are on the LEFT panel.
π Step-by-Step Usage GuideΒΆ
Follow the numbered steps below. Replace GIF placeholders with your own screen recordings.
Step 1 β Open the ScriptΒΆ
Click the GEE link above to open the script in the Code Editor
Click βΆ Run (top of the Code Editor) to initialize the GUI
The interface loads with a three-panel layout; the map defaults to a satellite view centred on Indonesia
https://
Step 2 β Define an Area of Interest (AOI)ΒΆ
You have two options:
Option A β Draw on the map (Right Panel β Section 1):
Click β¬ Draw Polygon or β¬ Draw Rectangle
Click on the map to draw your study area
Complete the shape; the AOI is saved automatically and the boundary is hidden
https://
Option B β Load a GEE Asset (Right Panel β Section 2):
Paste your uploaded GEE Asset ID into the text box (e.g.,
projects/your-project/assets/your-shapefile)Click β¬ Load Asset as AOI
The asset boundary will be displayed in orange on the map
https://
Step 3 β Configure Sensor and Date RangeΒΆ
In the Right Panel β Section 3 β Sensor & Date Range:
Select Sensor from the dropdown:
Sentinel-2 SRβ 10 m resolution, red-edge bands available (B5, B6, B7, B8A)Landsat 8 SRβ 30 m resolution, OLI/TIRS bandsLandsat 9 SRβ 30 m resolution, improved OLI-2 radiometry
Set the time period β enter Start Date and End Date in
YYYY-MM-DDformatAdjust Max Cloud Cover using the slider (default: 20%)
Cloud masking β check Apply Automatic Cloud Masking and select the method:
For Sentinel-2:
Cloud Score+ (CS+)(recommended),SCL, orQA60For Landsat:
QA_PIXEL β Landsat Bitmask
https://
Step 4 β Select or Define a Spectral IndexΒΆ
In the Right Panel β Section 4 β Spectral Calculator, choose one of three modes:
Mode 1 β Ready-Use Index (recommended for standard indices):
Select the desired index from the dropdown list (40+ indices available)
The formula is automatically resolved to the correct sensor bands
Mode 2 β Normalized Difference:
Manually select Band A and Band B
Computes
(A β B) / (A + B)
Mode 3 β Raster Calculator:
Build a custom arithmetic expression using the on-screen numpad
Use band names (e.g.,
B8,B4), operators (+,-,*,/,sqrt()), and parenthesesClick any Index button in the quick-insert panel to embed a ready-use formula into your expression
π· Insert GIF here: Selecting NDVI from Mode 1 dropdown, then switching to Mode 3 and building a custom expression
Step 5 β Run Analysis and Render the MapΒΆ
In the Right Panel β Section 5 β Execute Analysis & Render:
Enter a descriptive name in the Output layer name field (e.g.,
NDVI_Mangrove_2023)Click βΆ RUN ANALYSIS β this computes the median composite and the selected index over your AOI
Wait for the status bar (top right) to confirm
β Analysis completeClick π RENDER MAP to display the result on the map
The map will show both the True Color composite (hidden by default, toggle via Layer Control) and the index layer with automatic stretch.
π· Insert GIF here: Clicking RUN ANALYSIS, waiting for status confirmation, then clicking RENDER MAP
Step 6 β Adjust Colour Palette and VisualizationΒΆ
In the Left Panel β Colour Palette:
Scroll through the palette list and click any palette name to apply it instantly (e.g.,
NDVI_Custom,RdYlGn,Viridis)Check Reverse Palette to invert the colour ramp
The Legend at the bottom of the left panel updates automatically with the current min/max values
π· Insert GIF here: Clicking through different palettes and observing the map update
Step 7 β Apply Thresholding (Optional)ΒΆ
In the Left Panel β Enable Thresholding:
Check Enable Thresholding to reveal the thresholding controls
Choose a mode:
1 Criterion (Lower Bound) β use the slider to mask all pixels below a threshold value (e.g., show only pixels with NDVI β₯ 0.4 to isolate dense vegetation)
2 Criteria (Min & Max Range) β enter a minimum and maximum value to retain only pixels within that range, then click Apply Threshold
The map updates in real-time to reflect the mask
π· Insert GIF here: Enabling thresholding, sliding the lower bound to isolate high-NDVI vegetation
Step 8 β Calculate Area StatisticsΒΆ
In the Left Panel β Area Statistics:
After applying any threshold (optional), click Calculate Masked Area
The total area of unmasked (valid) pixels within the AOI is computed and displayed in Hectares
This is particularly useful for estimating the spatial extent of mangrove canopy, dense vegetation, or any class defined by your threshold.
π· Insert GIF here: Clicking Calculate Masked Area and the result appearing in Hectares
Step 9 β Export ResultsΒΆ
In the Right Panel β Section 6 β Export:
Select Export Destination:
Google DriveorGEE AssetEnter a Task Name, File Name, and Folder Name (or Asset Path)
Select Export Scale in metres per pixel (default: 10 m for Sentinel-2; use 30 m for Landsat)
Select CRS (default:
EPSG:4326)Click β¬ SUBMIT EXPORT TASK
Open the Tasks tab (βΆ icon in the top-right of the Code Editor) and click Run next to your new task
π· Insert GIF here: Filling in export parameters, submitting the task, and opening the Tasks tab
Step 10 β Layer ControlΒΆ
In the Right Panel β Section 7 β Layer Control:
A list of all rendered layers is displayed with checkboxes
Toggle any layer on/off by checking or unchecking it
The True Color composite is added at each render and can be toggled for visual reference
π· Insert GIF here: Toggling layers on and off using the Layer Control checkboxes
π Supported Spectral IndicesΒΆ
| Category | Indices |
|---|---|
| Broadband Vegetation | NDVI, EVI, EVI2, SAVI, MSAVI, MSAVI2, OSAVI, ARVI, VARI |
| Simple & Transformed Ratios | SR, TRVI, MSR_Red, RDVI, DVI, IPVI |
| Green-band Indices | GRVI, GNDVI, GCI, MSR_Green, GCVI, CVI |
| Chlorophyll & Pigment | CCI, GLI, NDYI, TGI, TriVI, SIPI, PRI, NNIR |
| Water & Moisture | NDWI (Gao), MNDWI (McFeeters) |
| SWIR-based | NBR, AFRI2100, SLAVI, CAI, NDBI, BSI |
| Red-Edge (Sentinel-2 only) | NDREI, RENDVI, CIRE, MCARI, MTCI, mRE-SR |
π΄ Red-edge indices require Sentinel-2 SR. They will not compute correctly with Landsat sensors due to the absence of red-edge bands.
π§° Technical NotesΒΆ
Scaling and Reflectance Correction:
Sentinel-2: divided by 10,000 to convert DN to surface reflectance (0β1)
Landsat 8/9: Collection 2 scaling applied β
SR Γ 0.0000275 + (β0.2)
Cloud Masking Methods (Sentinel-2):
Cloud Score+: Uses thecs_cdfband with a β₯ 0.60 threshold β recommended for most applicationsSCL: Masks classes 3, 7, 8, 9, 10, 11 (shadows, clouds, cirrus, snow)QA60: Bitmask masking for opaque cloud (bit 10) and cirrus (bit 11)
Composite Method:
Temporal median composite across all filtered images within the specified date range
Area Calculation:
Uses
ee.Image.pixelArea()reduced over the AOI geometryScale: 10 m (sufficient for Sentinel-2 outputs)
π Recommended Directory Structure for GIFsΒΆ
your-repo/
βββ README.md
βββ assets/
β βββ step1_open_script.gif
β βββ step2_define_aoi.gif
β βββ step3_sensor_date.gif
β βββ step4_select_index.gif
β βββ step5_run_render.gif
β βββ step6_palette.gif
β βββ step7_threshold.gif
β βββ step8_area.gif
β βββ step9_export.gif
β βββ step10_layers.gif
βββ script/
βββ ee_spectral_explorer.jsπ¬ ContactΒΆ
Defani Arman Alfitriansyah
Faculty of Forestry and Environment
Universitas Kuningan
Last updated: 2025