# 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
Figure 7: Flowchart of the open water mapping algorithm implemented in AUTOWADE. Dark gray rectangles represent operations; parallelograms represent data (light gray: input/output data, dark gray: intermediate data). The creation of the two buffer zones (cyan and green in Figure 8c) aims at selecting a set of pixels containing a comparable amount of water and non-water pixels. To verify the bimodality of the histogram of the backscatter values of this set of pixels, a Gaussian mixture model (GMM) is assumed. The population formed by the pixels included in the buffer zones is therefore considered as represented by two normally distributed subpopulations (water and non-water pixels). The rationale is that, with an increasing equivalent number of looks, the PDF of the log-transformed \(\sigma^{0}\) can be modeled as a Gaussian distribution [24]. Then, a non-linear least square fit to a Gaussian function is computed for the histograms of the two buffer zones. Figure 9 shows, for the same case study considered in Figure 8, the histograms of the pixel values of the two buffer zones, and the Gaussian functions fitting the histograms. Figure 8: Panel (**a**): RGB false color images created using the S1 data gathered to produce the floodwater/permanent water map for the EMSR359 case study and zooming on the area affected by the flood; red: pre-flood image (at \(t_{1}\)), green/blue: flood image (at \(t_{2}\)). Panel (**b**): output of the ISODATA applied to the flood image (CDWA in red). Panel (**c**): same as panel (**a**), but with superimposed the land-permanent water edge (yellow), the buffer zone included in the MCDWA (cyan) and the buffer zone included neither in the MCDWA, nor in the CDWA (green). The bimodality of the overall histogram is tested by evaluating the Ashman's D coefficient [43], the bimodality coefficient [44; 45], and the ratio between the modes. If these quantities are larger than threshold values determined in previous literature (see Appendix B for details), the bimodality test is considered as passed. Otherwise, the buffer zone containing the smallest number of pixels is enlarged and the bimodality test is repeated. This iterative process stops when the bimodality test is passed or a maximum number of 100 repetitions is reached. If the bimodality check is passed, the Otsu's automatic method [40] is used to compute a threshold value (\(Th_{Obsu\_w}\)). Then, RG is applied, as done in [18; 26; 46], in order to account for the spatial context that is not considered if changed pixels are simply identified based on a threshold value, without any tolerance. RG analyses neighboring pixels of a set of seed points and determines whether the pixel neighbors should be added to the seed region based on a tolerance criterion [41; 42]. The following relationships are used to determine the seed region and the tolerance:  
\[i\in seed\ region\implies\sigma^{0}_{VV}(i)<\sigma^{0}_{VV\_seed}=0.5\cdot(Th_{ Obsu\_w}+\mu_{w}) \tag{1}\]  
\[\sigma^{0}_{VV\_Tolerance}=(\mu_{w}+2s_{w}) \tag{2}\]  
where \(i\) is a pixel of the processed frame, \(\mu_{w}\) and \(s_{w}\) are the mean value and standard deviation of the Gaussian distribution fitting the histogram of the \(\sigma^{0}_{VV}\) values of the pixels in the buffer zone included in the MCDWA (cyan solid line in Figure 9). From Equation (1), it can be deduced that the seed region is formed by the pixels whose backscattering is less than the mean value between the mode of the aforementioned Gaussian distribution (corresponding to the mean) and \(Th_{Obsu\_w}\). If the bimodality test is not passed after 100 repetitions of the iterative process described above, default values derived from the analysis of the test cases reported in Table 2 are used to identify the seed region and the tolerance, namely \(\sigma^{0}_{VV\_seed}=-17\) dB and \(\sigma^{0}_{VV\_Tolerance}=-14\) dB.