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:

$$\Delta\sigma^0_{dB} = \sigma^0_{flood} - \sigma^0_{pre} \ll 0$$

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.

$$t^* = \arg\max_t \left[\omega_0(t)\omega_1(t)\left(\mu_0(t) - \mu_1(t)\right)^2\right]$$

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

  1. Compute the histogram of the SAR backscatter image (typically 256 bins).
  2. For each possible threshold $t$, compute the class probabilities $\omega_0, \omega_1$ and class means $\mu_0, \mu_1$.
  3. Compute the between-class variance $\sigma_B^2(t) = \omega_0\omega_1(\mu_0 - \mu_1)^2$.
  4. Select $t^*$ that maximizes $\sigma_B^2$.
  5. 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

Python
script.py161 lines

Click 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:

$$Precision = \frac{TP}{TP + FP}, \quad Recall = \frac{TP}{TP + FN}, \quad F_1 = \frac{2 \cdot Precision \cdot Recall}{Precision + Recall}$$

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:

$$R_{dB} = \sigma^0_{flood,dB} - \sigma^0_{ref,dB} = 10\log_{10}\left(\frac{\sigma^0_{flood}}{\sigma^0_{ref}}\right)$$

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:

$$P(flood|\sigma^0) = \frac{P(\sigma^0|flood) \cdot P(flood)}{P(\sigma^0)}$$

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.

6. Key Takeaways

βœ“SAR flood detection exploits the specular reflection of smooth water, producing dark pixels with very low backscatter ($\sigma^0 < -20$ dB).
βœ“Otsu thresholding automatically separates the bimodal SAR histogram into water and land classes without manual parameter tuning.
βœ“Morphological operations, terrain masking, and permanent water subtraction are essential post-processing steps for operational accuracy.
βœ“Change detection (log-ratio of pre/post images) is more robust than single-image thresholding, especially in complex landscapes.
βœ“Double-bounce scattering in flooded urban areas and forests produces bright returns, requiring specialized detection algorithms.