Module 6: Flood Mapping with SAR
Synthetic Aperture Radar (SAR) is the primary tool for flood mapping because it penetrates clouds and operates day and night. This module covers the physics of radar backscatter over floodwater, the Otsu automatic thresholding method, and a complete flood detection pipeline from SAR imagery to GeoJSON polygon export.
1. SAR Backscatter & Flood Physics
When microwave radiation from a SAR sensor strikes a smooth water surface, specular reflection directs most energy away from the satellite β producing very low backscatter (dark pixels in SAR imagery). In contrast, rough land surfaces scatter energy in all directions (diffuse scattering), producing moderate to high backscatter.
This contrast is the basis for SAR-based flood detection. The key observable is the change in backscatter coefficient between pre-flood and flood acquisitions:
A large negative change (typically β3 to β10 dB) indicates flooding. Sentinel-1 C-band (5.4 GHz) VV polarization is most commonly used because it is most sensitive to the water surface roughness contrast. Co-polarized (VV) backscatter drops more dramatically over open water than cross-polarized (VH).
Specular Reflection
Smooth open water acts as a mirror. SAR signal reflects away from the sensor. Backscatter: β20 to β30 dB. Appears dark in SAR imagery.
Double-Bounce
Flooded urban areas or forests: signal bounces off water surface and vertical structures (walls, tree trunks). Produces bright returns (β5 to 0 dB).
Volume Scattering
Dry vegetation canopy: multiple internal reflections within the canopy volume. Moderate backscatter (β10 to β15 dB). Unchanged during flood if water is below the canopy.
Key Challenge: Radar Shadow & Layover
In mountainous terrain, radar shadow (no signal return) can be confused with floodwater. Similarly, wind roughening of water surfaces increases backscatter, reducing the waterβland contrast. Terrain correction using a DEM and multi-temporal compositing help mitigate these issues.
2. Otsu Automatic Thresholding
Flood detection requires separating SAR pixels into two classes: water and non-water. Otsu's method finds the optimal threshold that maximizes the between-class variance, equivalent to minimizing the within-class variance. For a bimodal histogram (the typical case for SAR flood imagery), this yields an optimal separation.
where $\omega_0(t)$ and $\omega_1(t)$ are the probabilities of the two classes separated by threshold $t$, and $\mu_0(t)$and $\mu_1(t)$ are their respective mean intensities. The algorithm exhaustively evaluates all possible thresholds and selects the one maximizing this criterion.
Algorithm Steps
- Compute the histogram of the SAR backscatter image (typically 256 bins).
- For each possible threshold $t$, compute the class probabilities $\omega_0, \omega_1$ and class means $\mu_0, \mu_1$.
- Compute the between-class variance $\sigma_B^2(t) = \omega_0\omega_1(\mu_0 - \mu_1)^2$.
- Select $t^*$ that maximizes $\sigma_B^2$.
- Classify all pixels with backscatter $\leq t^*$ as water.
Limitations & Refinements
Otsu assumes a bimodal distribution, which may fail when the flood extent is very small (the water peak is negligible) or when there are multiple land cover types. Common refinements include: (1) tile-based adaptive thresholding, where Otsu is applied independently to spatial subsets; (2) region-growing from seed pixels below a conservative threshold; (3) Expectation-Maximization fitting of a Gaussian mixture model to the bimodal histogram.
3. Complete Flood Detection Pipeline
This pipeline generates synthetic Sentinel-1 SAR imagery (pre-flood and flood), applies Otsu thresholding, performs morphological refinement to remove noise, estimates the flooded area, and exports flood polygons as GeoJSON. The 3-panel visualization shows the pre-flood baseline, the flood image, and the detection overlay.
SAR Flood Detection Pipeline with Otsu Thresholding
PythonClick Run to execute the Python code
Code will be executed with Python 3 on the server
4. Post-Processing & Accuracy Assessment
Raw binary flood masks require post-processing to remove false positives (radar shadow, dark agricultural fields) and false negatives (wind-roughened water, flooded vegetation). The following techniques are standard in operational systems:
Morphological Operations
Binary opening (erosion + dilation) removes isolated noise pixels. Binary closing (dilation + erosion) fills small holes within flood patches. Connected-component labeling followed by size filtering removes clusters smaller than a minimum area threshold (typically 0.5β1 ha).
Terrain Masking
A Digital Elevation Model (e.g., Copernicus DEM at 30 m) is used to mask out areas with slope greater than 5β10 degrees, which cannot be flooded. Radar shadow and layover masks derived from the DEM and sensor geometry further reduce false positives in mountainous terrain.
Permanent Water Mask
The JRC Global Surface Water dataset or Copernicus Water Bodies product provides a reference mask of permanent water. Subtracting this mask from the flood detection yields only the new flood extent, excluding rivers, lakes, and reservoirs that were already present before the event.
Accuracy Metrics
Flood maps are validated against optical imagery (when cloud-free), aerial survey, or crowdsourced observations. Standard metrics include:
Operational systems like the Copernicus Emergency Management Service (CEMS) typically achieve F1 scores of 0.85β0.95 for open water flooding but 0.60β0.75 for flooded vegetation, where the double-bounce signal complicates detection.
Operational Flood Mapping Services
Major operational services include: Copernicus EMS (Rapid Mapping activation within hours), UNOSAT (UN Satellite Centre, flood analysis for humanitarian response), NASA LANCE (near-real-time MODIS/VIIRS flood products), and the Global Flood Monitoring System (GFMS) at the University of Maryland. Sentinel-1's 6-day revisit time (12-day per satellite, two in constellation) makes it the primary SAR data source for these services in Europe and globally.
5. Change Detection & Multi-Temporal Analysis
While single-image thresholding works well when a clear bimodal distribution exists, change detection between pre-event and co-event imagery is more robust. The log-ratio approach is widely used:
The reference image is ideally a temporal median of multiple pre-event acquisitions (e.g., 10β20 Sentinel-1 scenes over 2β3 months), which reduces speckle noise. Pixels where $R_{dB} < -3$ dB are classified as newly flooded. This threshold can be refined per-region using local statistics.
For time-critical applications, the Bayesian approach models the probability of flooding given the observed backscatter change:
where the prior $P(flood)$ can incorporate hydrological model predictions or proximity to rivers. The likelihood $P(\sigma^0|flood)$ is modeled from the backscatter distribution of known water bodies in the scene. This probabilistic framework provides uncertainty estimates alongside the binary classification.