top of page
  • Writer's pictureMauricio Cordeiro

Unveiling Flooded Areas With Sentinel-1 (SAR) Imagery

Learn how to quickly delineate flooded areas through Sentinel-1 imagery the from Microsoft Planetary Computer using the "Sentinel-1 Flood Finder" package


Flood detection in Amazon region

Introduction

Floods, among the most devastating natural hazards, impact the lives of millions each year, causing tragic losses and widespread destruction. Timely forecasts and alert systems are crucial to minimizing deaths and damage, and obtaining accurate floodwater extent measurements is vital for effective emergency response. While traditional field surveys can be costly and impractical, remote sensing may offer a powerful solution.

However, conventional water detection techniques relying on optical satellite imagery often face limitations during floods. Intense cloud cover can obscure the ground, rendering optical sensors ineffective. In such scenarios, radar technology (i.e., Synthetic Aperture Radar, SAR) offers a critical advantage, being able to penetrate clouds and capture valuable data, even during extreme weather conditions. However, water mapping using SAR imagery is not straightforward and requires specialized techniques and tools.

S1FloodFinder: A User-Friendly Solution for Flood Mapping

During the past few months, I've been conducting a research on automating the delineation of flooded regions in Brazilian municipalities. After initial tests, it was clear the difficulty to perform such a study with optical imagery due to cloud cover, especially during these rainy events. Objectively, radar Sentinel-1 can be twice more effective than Sentinel-2 (58% vs. 28%) in detecting flood events, according to an assessment performed over Europe (Tarpanelli et al., 2022)[1].

The downside is that water detection through SAR can be overwhelming, often requiring advanced statistics or change detection approaches. There are no water indices, such as the NDWI, and simple thresholding, such as OTSU, does not deliver accurate results. Besides that, Sentinel-1 imagery is huge in size and can take too much time and storage space for manipulation of large areas.

With these challenges in mind, I developed the Python package called S1FloodFinder (published on GitHub) to be a user-friendly solution for generating flood maps directly from Sentinel-1 SAR imagery. It provides mainly two major advantages over existing algorithms:

  1. The package leverages radiometrically terrain corrected (RTC) S1 data directly from Microsoft Planetary Computer (Figure 1), streaming just the portion of data that it needs. This cloud-native approach eliminates the need for users to download and manage large volumes of imagery, streamlining the process significantly.

  2. The water detection algorithm behind it is a Random Forests trained with high quality water masks produced by the French National Centre for Space Studies (CNES).

Machine Learning Methodology

The S1FloodFinder package utilizes a pixel-based Random Forests approach on the VV and VH polarizations to detect water pixels within a scene. The model was trained using the CNES ALCD Open water masks [2]. The water masks cover distinct regions and weather seasons over continental France and were originally obtained from the Sentinel 2 imagery. During training phase, these masks were paired to the Sentinel 1 imagery (Figure 2), by identifying the closest date to match. The pre-trained model is available on the /model/RF_Model_v2.joblib file.

Water extents baseline

An additional necessary step in delineating floodwater extent involves identifying permanent and recurrent water baselines. For this purpose, we employ the Global Surface Water (GSW) dataset (Pekel et al., 2016) [3], also available from the Planetary Computer. Permanent water bodies are dynamic, so the goal is to prevent areas with recurring inundation from being classified as flood zones. A threshold is applied to the Water Recurrency layer, which accounts for the inter-annual recurrence of water pixels. Figure 3 illustrates the distinction between the more common Water Occurrence layer and the Water Recurrence layer, focusing on Eldorado du Sul - RS, where numerous rice crop farms exist. These areas experience seasonal inundation. Despite their limited inundation period (low occurrence), we aim to remove them from the final flood extent map, hence the use of the water recurrence layer.

Package Installation

The S1FloodFinder package is not yet available through PyPI repository, so the installation process can be done by pulling the package directly from github, like so:

If you are familiar with docker and prefer containerized development, the following command pulls the docker image with all the packages pre-installed:

docker pull cordmaur/planetary:v1

PS: To learn more about the use of docker for geospatial development, we have a series of posts about this subject here on GeoCorner:


Usage and example

The following notebook has the basic usage for the package.


Note that it requires only a Region of Interest (ROI) expressed as a GeoPandas GeoDataframe and the time frame of the analysis. Once the processing is complete, it can create flood maps automatically, in PDF format, through the ProcessorReporter class, as well as a time series of the detected flood extent for the specified region.

Figure 4 shows an example of the outputs for Alegrete-RS/Brazil. The time series shows the result of the flood detection for the whole period of imagery available from Sentinel 1, from 2016 to the present. We can notice the major flood occurred on January 2019.

Conclusion

While spaceborne remote sensing unlocks spatial analysis on regional and global scales, its accessibility can be hindered by complex data acquisition and preprocessing workflows. This complexity often deters potential users from various sectors, such as government agencies, NGOs, and the Academia, who could greatly benefit from this technology. The lack of user-friendly tools for automating these processes remains one of the barriers.

In this article we introduced the S1FloodFinder package, addressing this need by offering a lightweight and user-friendly solution for extracting flood extent information from Sentinel-1 SAR imagery. By eliminating the complexities of working with diverse technologies and data sources, S1FloodFinder empowers users to quickly leverage this valuable data for flood delineation, opening doors for broader applications.


References

[2] PENA LUQUE Santiago. (2019). CNES ALCD Open water masks (1.1) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.3522069

[3] Pekel, JF., Cottam, A., Gorelick, N. et al. High-resolution mapping of global surface water and its long-term changes. Nature 540, 418–422 (2016). https://doi.org/10.1038/nature20584


GeoCorner - Subscribe to our mailing list.
Sign up. Be inspired. Code.

Join the GeoCorner Community!

Subscribe to our newsletter for the latest insights, tips, and trends in geospatial technology and coding. Be at the forefront of geospatial innovation – right in your inbox.

bottom of page