# A Tool for Pre-Operational Daily Mapping of Floods and Permanent Water Using Sentinel-1 Data
## 3 Methods
### The Floodwater/Permanent Water Mapping Algorithm
#### 3.2.2 The Buffer-from-Edge (BFE) Approach to Map Open Water  
The core of the AUTOWADE tool is represented by the algorithm designed to map open floodwater and permanent water; its flowchart is shown in Figure 7. The algorithm is organized in two phases. In the first phase, open water is detected by processing the S1 data at time \(t_{2}\) (left side of Figure 7). In the second phase, the same operations performed on \(\sigma^{0}_{VV}(t_{2})\) are applied to the image difference to distinguish open floodwater from permanent water (right side of Figure 7). Only co-polarized data are used here, while VH data are successively used to identify flooded vegetation (Section 3.2.4). The algorithm is based on the BFE approach, which has been derived from the buffer-from-cluster approach proposed in [35] for optical data. The BFE approach takes advantage of the availability of the reference water mask derived from the WAW product and combines different image processing techniques, such as the Iterative Self-Organizing Data Analysis Technique Algorithm (ISODATA) [38], the Roberts edge filter [39], the Otsu's thresholding [40], and the region growing (RG) [41, 42]. The first step of the BFE approach consists of the application of the ISODATA, which is an unsupervised clustering algorithm that separates groups of objects in a scene (more details on the ISODATA can be found in Appendix A). The optimum number of clusters is not known, so it is generally chosen to be conservatively high [38]. Hence, although in this case the goal is to distinguish water from non-water, a maximum number of 10 clusters has been chosen. Since backscattering from open water is very low (see the Introduction), the objects belonging to the cluster presenting the lowest median of the values of \(\sigma^{0}_{VV}(t_{2})\) are selected and labelled as the clustering-derived water area (CDWA). Median value is used instead of mean value being less sensitive to outliers. Then, a reliable threshold separating water pixels from non-water ones is determined. Figure 6: Flowchart of the preliminary operations performed by AUTOWADE. Dark gray rectangles represent operations; parallelograms represent data (light gray: input/output data, dark gray: intermediate data). A fully automated algorithm requires to compute the threshold in an automatic way by using methods such as that proposed by [PERSON] [40]. However, automatic thresholding works well only if the fraction of water pixels is large enough to give rise to a detectable mode (i.e., the population composed of water and non-water pixels exhibits a bimodal distribution). To identify a subset of a S1 image whose histogram is characterized by two distinguishable modes, the CDWA is firstly combined with the reference water mask to include only the objects that contain permanent water bodies. In this way, the modified clustering-derived water area (MCDWA), which contains only open water detected by S1, is created. Then, a Roberts edge filter [39] is applied to the MCDWA to identify the water-land edge. Note that the Roberts filter is not directly applied to the reference mask because it may not represent the current water-land edge (for instance in case of river overflow). Successively, two buffer zones, whose buffering distance may be iteratively enlarged, are created around the edge. One buffer zone is included in the MCDWA (and is likely composed by water pixels); the other one is included neither in the MCDWA, nor in the CDWA (and is likely composed by non-water pixels). An example illustrating the location of the edge identified by the Roberts filter and the buffer zones is shown in Figure 8c. Looking at Figure 8, it can be noted that the pixels appearing red in panel (a), likely flooded because \(\sigma^{0}_{UV}(t_{2})\) is much smaller than \(\sigma^{0}_{UV}(t_{1})\), are not comprised in the cyan buffer zone in panel (c) because of the intersection between the original CDWA and the reference water mask, performed to be sure that the cyan buffer zone contains only water pixels.