Google Earth Engine Tutorial: Rapid Flood Mapping with Sentinel-1 SAR
Credit: Youtube Channel “Terra Spatial, Learn how to perform rapid flood mapping and assessment using Sentinel-1 SAR imagery.”
You can see all the tutorials from here: Techgeo Academy.
Rapid Flood Mapping with Sentinel-1 SAR using Google Earth Engine
Flood mapping is critical for disaster response and risk assessment. Sentinel-1 Synthetic Aperture Radar (SAR) data, with its ability to penetrate cloud cover and provide high-resolution information, is a powerful tool for this purpose. Google Earth Engine (GEE) enables efficient processing and analysis of large geospatial datasets. This tutorial demonstrates how to use GEE to create rapid flood maps with Sentinel-1 SAR data.
Step 1: Access Sentinel-1 Data in GEE
Sentinel-1 SAR data is available in GEE through the EE.ImageCollection('COPERNICUS/S1_GRD') dataset. This includes both C-band HH and HV polarization modes, with both Interferometric Wide Swath (IW) and Extra Wide Swath (EW) acquisitions. To filter for an appropriate time range, use the filterDate() and filterBounds() functions.
Step 2: Preprocess SAR Data
Preprocessing steps may vary depending on the mission and processing level. For example, to retrieve backscatter values, use select('VH') or select('VV') for polarization. Apply terrain correction with ee.Algorithms.Despeckle() and resample as needed with resample().
Step 3: Apply Flood Detection Algorithms
For flood detection, a common method is thresholding based on backscatter values. Water bodies typically show lower backscatter values in SAR imagery compared to land. Use a threshold (e.g., 0.05) to identify flooded regions and generate a binary mask with gt(0.05).
Step 4: Visualize and Export Results
Visualize the flood map using Map.addLayer(). Export results as GeoTIFF or other formats using Export.image.toDrive(). Adjust the export parameters, such as the region of interest, scale, and crs.
Example Code
// Load Sentinel-1 GRD image collection
var s1 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterDate('2023-06-01', '2023-06-30')
.filter(ee.Filter.eq('instrumentMode', 'IW'))
.filter(ee.Filter.eq('transmitterReceiverPolarization', 'VV'))
.filter(ee.Filter.eq('sensorSwath', 'IW'))
.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'))
.filter(ee.Filter.eq('platform_number', 'A'))
.map(function(image) {
return image.select('VV').reproject('EPSG:4326', null, 10).clip(geometry);
});
// Compute median composite
var s1_median = s1.median();
// Convert to float and apply threshold for flood detection
var floodMask = s1_median.select('VV').float().gte(0.05);
// Add overlay to map
Map.addLayer(floodMask, {palette: ['228B22', 'FF0000'], max: 1}, 'Flood Detection');
Key Considerations
- Ensure the
geometryvariable is defined as the study area. - Adjust the threshold value based on local conditions and SAR characteristics.
- For real-time monitoring, use GEE’s
ImageCollectionfunctions and time-series analysis.
Frequently Asked Questions (FAQ)
How does Sentinel-1 SAR assist in flood mapping?
Sentinel-1 SAR provides all-weather, day-and-night coverage, making it ideal for flood monitoring when optical sensors are hindered by clouds or darkness.
What preprocessing steps are essential for SAR data in GEE?
Common steps include terrain correction, speckle filtering, and resampling to ensure consistency across images. These steps depend on the specific dataset and application.
Why use median composites for flood mapping?
Median composites reduce noise and create a stable reference image for identifying anomalies like flooded areas over time.
Can GEE handle real-time flood monitoring?
Yes, GEE’s cloud-based processing capabilities allow efficient creation of flood maps for near real-time applications, provided the data is available and the script is optimized.
What are the limitations of SAR-based flood detection?
SAR data can be sensitive to surface roughness and vegetation, which may affect accuracy. Cross-validation with other data sources (e.g., optical imagery) is recommended for improved results.







