GEE Tutorials

Google Earth Engine Tutorial: Download NDWI and Visualize in ArcGIS

Credit: Youtube Channel “Terra Spatial, Guide on downloading NDWI images and creating water body visualizations in ArcGIS.”

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

Google Earth Engine Tutorial: Download NDWI and Visualize in ArcGIS

Normalized Difference Water Index (NDWI) is a useful tool for identifying water bodies in satellite imagery. This tutorial guides you through using Google Earth Engine (GEE) to calculate and export NDWI, followed by visualization in ArcGIS.

Step 1: Access Google Earth Engine

1. Visit https://earthengine.google.com/ and sign in with a Google account.
2. Open the Code Editor and ensure you have access to the required datasets (e.g., Landsat or Sentinel-2).

Step 2: Calculate NDWI in GEE

Select a satellite dataset (e.g., Landsat 8) and write a script to compute NDWI. For example:


// Load Landsat 8 image collection
var dataset = ee.ImageCollection("LANDSAT/LC08/C02/T1_L2")
.filterDate('2023-01-01', '2023-12-31')
.filter(ee.Filter.eq('WRS_PATH', 123))
.filter(ee.Filter.eq('WRS_ROW', 56));

// Select the first image in the collection
var image = dataset.first();

// Calculate NDWI using SWIR1 and Green bands
var ndwi = image.normalizedDifference(['SR_B6', 'SR_B3']);

// Display NDWI in GEE
Map.centerObject(image, 9);
Map.addLayer(ndwi, {min: 0, max: 1, palette: ['blue', 'cyan']}, 'NDWI');

Adjust the filterDate and filter parameters to match your area of interest (AOI).

Step 3: Export NDWI as GeoTIFF

1. In the Code Editor, click the “Export” tab and select “Export Image”.
2. Choose the ndwi image and set the file format to GeoTIFF.
3. Specify the export region and scale. For example:


// Set export dimensions and scale
var region = image.geometry();
var scale = 30;
var crs = 'EPSG:4326';

// Export NDWI
Export.image(ndwi, 'ndwi_export', {
'region': region,
'scale': scale,
'crs': crs,
'fileFormat': 'GeoTIFF'
});

Wait for the export to complete and download the file from the “Assets” tab in GEE.

Step 4: Visualize in ArcGIS

1. Open ArcGIS Pro or ArcMap and add the downloaded GeoTIFF as a raster layer.
2. Adjust the symbology to highlight water bodies (e.g., use a “Stretched” renderer with a blue to cyan palette).
3. Use the “Raster Calculator” or “Spectral Analysis” tools to further analyze the NDWI values.

Best Practices

  • Ensure the AOI is defined clearly to avoid unnecessary computations.
  • Use high-resolution datasets for detailed water body mapping.
  • Calibrate NDWI values based on your regional climate and water conditions.

FAQ

How do I choose the right satellite for NDWI?

For NDWI, Landsat 8 or 9 (using SR_B6 and SR_B3 bands) is common. Sentinel-2 users can leverage the MCI (Modified Centroid Index) or use the NIR and SWIR2 bands.

What if my GEE export fails?

Check for an active internet connection, ensure your GEE project has enough storage, and avoid overloading the dataset. Use smaller AOIs or reduce the resolution if needed.

Can I use NDWI for flood detection?

Yes. NDWI helps identify flooded areas by highlighting water content. Post-export, you can create a threshold map in ArcGIS to isolate high NDWI values.

Why is my NDWI layer not visible in ArcGIS?

Verify the coordinate system (CRS) of the GeoTIFF aligns with your project’s CRS. Check the layer properties for correct band configuration and ensure the file path is valid.

How to automate NDWI processing for multiple dates?

Modify the script to loop through the date range and export each NDWI result individually. Use dataset.map to apply the index calculation to all images.

Similar Posts

Leave a Reply

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