GEE Tutorials

Google Earth Engine Tutorial: Download NDMI and Visualize in ArcGIS

Credit: Youtube Channel “Terra Spatial, Tutorial on downloading NDMI images and creating visualizations in ArcGIS for analysis.”

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

Google Earth Engine Tutorial: Download NDMI and Visualize in ArcGIS

Google Earth Engine (GEE) is a powerful platform for geospatial analysis, enabling users to process satellite imagery and derive indices like the Normalized Difference Moisture Index (NDMI). NDMI is particularly useful for assessing vegetation moisture content and monitoring agricultural or ecological conditions. This tutorial outlines how to download NDMI data from GEE and visualize it in ArcGIS.

Step 1: Access Google Earth Engine

Ensure you have a Google account and access to the GEE platform. Visit https://earthengine.google.com to sign in. Install the GEE JavaScript API plugin if necessary.

Step 2: Write a GEE Script to Calculate NDMI

Use the following script to calculate NDMI for a specific area and time range. Replace "your_asset_id" with your desired dataset, such as Landsat 8.


// Load a Landsat 8 image collection
var dataset = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
.filterDate("2020-01-01", "2020-12-31")
.filter(ee.Filter.eq("WRS_PATH", 120))
.filter(ee.Filter.eq("WRS_ROW", 56));

// Select the Near-Infrared (NIR) and Shortwave Infrared (SWIR1) bands
var nir = dataset.select("B5");
var swir = dataset.select("B6");

// Compute NDMI
var ndmi = nir.subtract(swir).divide(nir.add(swir)).rename("NDMI");

// Display NDMI on the map
Map.addLayer(ndmi, {min: -0.5, max: 0.5, palette: ["blue", "green", "red"]}, "NDMI");

Step 3: Export NDMI Data

Export the calculated NDMI as a GeoTIFF file to Google Drive. Adjust the region, scale, and crs parameters as needed.


// Export NDMI image to Google Drive
Export.image.toDrive({
image: ndmi,
description: "NDMI_Exports",
folder: "GEE_Exports",
fileNamePrefix: "NDMI_2020",
region: [[[-122.0, 38.0], [-122.0, 37.5], [-121.5, 37.5], [-121.5, 38.0]], "projection": "EPSG:4326",
scale: 30,
crs: "EPSG:4326",
maxPixels: 1e10
});

Step 4: Import NDMI Data into ArcGIS

After exporting the GeoTIFF file to Google Drive, download it to your local machine. Open ArcGIS and use the Import Raster tool to load the GeoTIFF. Adjust the symbology to highlight moisture levels using a color gradient or classify the values.

Step 5: Analyze and Visualize in ArcGIS

Once the raster is loaded, use ArcGIS tools like Reclassify or Calculate Statistics to enhance the visualization. Add the NDMI layer to your map and overlay it with other datasets (e.g., land use, elevation) for further analysis.

FAQ

How do I authenticate with Google Earth Engine?

Sign in with your Google account on the GEE platform. You may need to run ee.Authenticate() in the Code Editor to authorize access.

Can I use other satellite data for NDMI calculations?

Yes, NDMI can be calculated using any satellite with appropriate NIR and SWIR bands. For example, Landsat 5/7 uses B4 and B5, while Sentinel-2 uses B8A and B11.

Why is my NDMI data not showing up in ArcGIS?

Ensure the GeoTIFF is properly downloaded and the file format is supported. Check for projection mismatches and validate the coordinate reference system (CRS) settings during export.

What is the typical range for NDMI values?

NDMI values typically range between -1 and 1. Higher values (>0.5) indicate dense vegetation with high moisture content, while lower values (<0) suggest dry or sparse vegetation.

How do I handle large datasets in GEE?

Optimize your script by specifying region and scale parameters. Use clip() or reduceRegion() to narrow the area of interest before exporting.

Similar Posts

Leave a Reply

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