GEE Tutorials

Google Earth Engine Tutorial: Beginners Guide 31 Calculate and Extract Monthly EVI

Credit: Youtube Channel “Terra Spatial, Tutorial on computing Enhanced Vegetation Index values monthly and exporting them to CSV format.”

You can see all the tutorials from here: Techgeo Academy.


Google Earth Engine Tutorial: Beginners Guide 31 Calculate and Extract Monthly EVI using Google Earth Engine

Google Earth Engine (GEE) is a powerful platform for processing and analyzing geospatial data. This tutorial explains how to calculate and extract monthly Enhanced Vegetation Index (EVI) data using GEE. EVI is widely used to assess vegetation health, especially in areas with dense vegetation.

Step 1: Initialize Google Earth Engine

Before starting, ensure you have access to the GEE platform. Open the Code Editor and initialize the library by running:

var region = geometry;  
var dataset = ee.ImageCollection("MODIS/006/MOD13A2");  
var evi = dataset.select(['EVI']);  
var eviMean = evi.mean();  
Map.addLayer(eviMean, {min: -1, max: 1, palette: ['green', 'yellow', 'red']}, 'EVI Monthly Mean');

Step 2: Filter and Select EVI Data

Filter the dataset by a specific date range and region. For example:

var filtered = dataset.filterDate('2020-01-01', '2020-12-31')  
  .filterBounds(region);  
var eviCollection = filtered.select(['EVI']);

Step 3: Calculate Monthly EVI

Create a function to calculate monthly EVI and map it over the collection:

function getMonthlyEVI(image) {  
  var month = ee.Number(image.get('system:time_start')).format('YYYY-MM');  
  var monthImage = image.select('EVI').rename(month);  
  return monthImage;  
}  
var monthlyEVI = eviCollection.map(getMonthlyEVI);

Step 4: Visualize and Export

Visualize the monthly EVI data on the map and export it to Google Drive:

Map.centerObject(region, 6);  
Map.addLayer(monthlyEVI, {min: -1, max: 1, palette: ['green', 'yellow', 'red']}, 'Monthly EVI');  
Export.image.toDrive({  
  image: monthlyEVI,  
  description: 'Monthly_EVI',  
  fileNamePrefix: 'monthly_evi',  
  region: region,  
  scale: 500,  
  maxPixels: 1e10  
});

FAQ

  • What is EVI in Google Earth Engine?

    EVI (Enhanced Vegetation Index) quantifies vegetation health by accounting for atmospheric effects and canopy structure, using bands like near-infrared (NIR), red, and blue.

  • How to adjust the code for different datasets?

    Modify the dataset name (e.g., “MODIS/006/MOD13A2”) and band names based on the specific source. Ensure the formula aligns with the dataset’s parameters.

  • Can EVI be calculated for other sensors?

    Yes, but the formula might differ. For example, Landsat 8 uses NIR, RED, and BLUE with a G value of 2.5. Check the sensor’s documentation for accuracy.

  • How to visualize EVI on the map?

    Use the Map.addLayer() method with appropriate min/max values and a palette to highlight vegetation changes.

  • What if the EVI values are not within -1 to 1?

    Adjust the min and max parameters in the visualization settings. Exported data will still retain the original range for analysis.


Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *