Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

EE-SPECTRAL-EXPLORATION

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

Repositori di GitHub

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:


πŸ”— Access the ApplicationΒΆ

Open the script directly in the GEE Code Editor:

Open in GEE
https://code.earthengine.google.com/855c2692093e0ff2901447b2b9cb7814?hl=id

⚠️ A Google Earth Engine account is required. Register at earthengine.google.com if you do not have access.


πŸ–₯️ Interface LayoutΒΆ

The interface is divided into three panels:

PanelLocationFunction
Left PanelLeft sideColour palette, thresholding, area statistics, legend
Map PanelCentreInteractive satellite basemap with rendered layers
Right PanelRight sideAll 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ΒΆ

  1. Click the GEE link above to open the script in the Code Editor

  2. Click β–Ά Run (top of the Code Editor) to initialize the GUI

  3. The interface loads with a three-panel layout; the map defaults to a satellite view centred on Indonesia

https://github.com/user-attachments/assets/ebbc7870-fe27-49e6-b51c-e2efb3523152

Step 2 β€” Define an Area of Interest (AOI)ΒΆ

You have two options:

Option A β€” Draw on the map (Right Panel β†’ Section 1):

  1. Click ⬟ Draw Polygon or ⬛ Draw Rectangle

  2. Click on the map to draw your study area

  3. Complete the shape; the AOI is saved automatically and the boundary is hidden

https://github.com/user-attachments/assets/dd9b2209-b2e6-4919-800d-3f66b01c7720

Option B β€” Load a GEE Asset (Right Panel β†’ Section 2):

  1. Paste your uploaded GEE Asset ID into the text box (e.g., projects/your-project/assets/your-shapefile)

  2. Click ⬆ Load Asset as AOI

  3. The asset boundary will be displayed in orange on the map

https://github.com/user-attachments/assets/a6e534c4-95b3-487c-8f91-c2e5852d3a32

Step 3 β€” Configure Sensor and Date RangeΒΆ

In the Right Panel β†’ Section 3 β€” Sensor & Date Range:

  1. 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 bands

    • Landsat 9 SR β€” 30 m resolution, improved OLI-2 radiometry

  2. Set the time period β€” enter Start Date and End Date in YYYY-MM-DD format

  3. Adjust Max Cloud Cover using the slider (default: 20%)

  4. Cloud masking β€” check Apply Automatic Cloud Masking and select the method:

    • For Sentinel-2: Cloud Score+ (CS+) (recommended), SCL, or QA60

    • For Landsat: QA_PIXEL β€” Landsat Bitmask

https://github.com/user-attachments/assets/54f5547b-73e7-4361-a907-0890546305af

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):

Mode 2 β€” Normalized Difference:

Mode 3 β€” Raster Calculator:


πŸ“· Insert GIF here: Selecting NDVI from Mode 1 dropdown, then switching to Mode 3 and building a custom expression

![Step 4 - Select Index](https://raw.githubusercontent.com/Defani/EE-SPECTRAL-EXPLORATION/main/assets/step4_select_index.gif)

Step 5 β€” Run Analysis and Render the MapΒΆ

In the Right Panel β†’ Section 5 β€” Execute Analysis & Render:

  1. Enter a descriptive name in the Output layer name field (e.g., NDVI_Mangrove_2023)

  2. Click β–Ά RUN ANALYSIS β€” this computes the median composite and the selected index over your AOI

  3. Wait for the status bar (top right) to confirm βœ” Analysis complete

  4. Click πŸ‘ 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 5 - Run and Render](https://raw.githubusercontent.com/Defani/EE-SPECTRAL-EXPLORATION/main/assets/step5_run_render.gif)

Step 6 β€” Adjust Colour Palette and VisualizationΒΆ

In the Left Panel β†’ Colour Palette:

  1. Scroll through the palette list and click any palette name to apply it instantly (e.g., NDVI_Custom, RdYlGn, Viridis)

  2. Check Reverse Palette to invert the colour ramp

  3. 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 6 - Palette Selection](https://raw.githubusercontent.com/Defani/EE-SPECTRAL-EXPLORATION/main/assets/step6_palette.gif)

Step 7 β€” Apply Thresholding (Optional)ΒΆ

In the Left Panel β†’ Enable Thresholding:

  1. Check Enable Thresholding to reveal the thresholding controls

  2. 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

  3. 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 7 - Thresholding](https://raw.githubusercontent.com/Defani/EE-SPECTRAL-EXPLORATION/main/assets/step7_threshold.gif)

Step 8 β€” Calculate Area StatisticsΒΆ

In the Left Panel β†’ Area Statistics:

  1. After applying any threshold (optional), click Calculate Masked Area

  2. 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 8 - Area Statistics](https://raw.githubusercontent.com/Defani/EE-SPECTRAL-EXPLORATION/main/assets/step8_area.gif)

Step 9 β€” Export ResultsΒΆ

In the Right Panel β†’ Section 6 β€” Export:

  1. Select Export Destination: Google Drive or GEE Asset

  2. Enter a Task Name, File Name, and Folder Name (or Asset Path)

  3. Select Export Scale in metres per pixel (default: 10 m for Sentinel-2; use 30 m for Landsat)

  4. Select CRS (default: EPSG:4326)

  5. Click ⬇ SUBMIT EXPORT TASK

  6. 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 9 - Export](https://raw.githubusercontent.com/Defani/EE-SPECTRAL-EXPLORATION/main/assets/step9_export.gif)

Step 10 β€” Layer ControlΒΆ

In the Right Panel β†’ Section 7 β€” Layer Control:


πŸ“· Insert GIF here: Toggling layers on and off using the Layer Control checkboxes

![Step 10 - Layer Control](https://raw.githubusercontent.com/Defani/EE-SPECTRAL-EXPLORATION/main/assets/step10_layers.gif)

πŸ“ Supported Spectral IndicesΒΆ

CategoryIndices
Broadband VegetationNDVI, EVI, EVI2, SAVI, MSAVI, MSAVI2, OSAVI, ARVI, VARI
Simple & Transformed RatiosSR, TRVI, MSR_Red, RDVI, DVI, IPVI
Green-band IndicesGRVI, GNDVI, GCI, MSR_Green, GCVI, CVI
Chlorophyll & PigmentCCI, GLI, NDYI, TGI, TriVI, SIPI, PRI, NNIR
Water & MoistureNDWI (Gao), MNDWI (McFeeters)
SWIR-basedNBR, 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:

Cloud Masking Methods (Sentinel-2):

Composite Method:

Area Calculation:


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