# A Visualization Tool for Flood Dynamics Monitoring Using a Graph-Based Approach
## 3 Method/Method Adaptations  
Most of the workflow, presented in [9], has been retained for upscaling this research, yet some modifications were still necessary (Figure 3).  
The Active contour modelling (ACM) sufficed for delineating water bodies in a small area [9], yet application of ACM on the current regions of interest leads to big over- and underestimations of the water extent. A more suitable way of obtaining the binary water maps was found by application  
Figure 2: Case II: ROI near the city Patna in the State of Bihar, India (Spatial reference system EPSG:4326 [14]).  
of tiled thresholding using the Otsu algorithm [19]. This method selects a threshold by minimizing the within-class variance of two groups of pixels separated by the thresholding operator. It does not depend on modeling the probability density functions, and it assumes a bimodal distribution of gray-level values.  
Permanent water bodies are then eliminated from the binary water maps by classifying pixels which are recognized as water in all timesteps, to permanent water, and excluding them from further evaluation.  
In [9], the minimal mapping unit (MMU) was ensured by dropping all water polygons smaller than 16 pixels after polygonization. This however, results in a net loss of water area. For the current research, the MMU was obtained in a different way, i.e., by applying morphological operators [20]. First, a morphological closing reassigns non-water areas of maximum 4 by 4 pixels to water, if they are completely surrounded by water. Subsequently, morphological opening reassigns isolated water bodies smaller than 4 by 4 pixels non-water. In this way, the net loss of water area is compensated.  
At this point, objects are created ('Polygonize' in Figure 3), reducing all detected water bodies to their individual extent and mean backscatter. Subsequently, they are grouped into entities ('Graph construction' in Figure 3) if they display spatial overlap on consecutive timesteps. Their evolution is then studied, based on the evolution of area and mean backscatter. This results in a different perception of the flood compared to a pixel-based analysis. Moreover, the analysis is simplified, which improves calculation time and ease of interpretation.  
The evolution of each entity \(o*\) is described by an evolution graph \(G_{o}*\), which is a Directed Acyclic Graph (DAG), \(G_{0}*=(V_{0}*,E_{0}*)\). The nodes \(V\) represent the water bodies and the edges \(E\) represent their spatio-temporal overlap (from [PERSON] et al. [11]).  
\[V_{0}*=\left\{o|o\,\epsilon\,\vartheta,\,\frac{|Pix(o*)\cap Pix(o)|}{|Pix(o)|} \geq\sigma_{1}\,\,\,\,\text{or}\,\,\,\frac{|Pix(o*)\cap Pix(o)|}{|Pix(o*)|} \geq\sigma_{2}\right\} \tag{1}\]  
\[V_{0}*=\left\{o|o\,\epsilon\,\,\vartheta,\,|Pix(o*)\cap Pix(o)|\geq 0\right\}. \tag{2}\]  
\[E_{0}*=\left\{(o^{i},o^{j})|o^{i}\,\epsilon\,O_{t}\cap V_{o}*,o^{j}\,\epsilon \,O_{t+1}\cap V_{o}*\,\,\,\,\text{and}\,\,\,\,Pix(o^{i})\cap Pix(o^{j})\
eq \varnothing\right\}. \tag{3}\]  
Dynamics are quantified as follows [10] :  
\[Var(G_{i},G_{i+1})=\sum_{o_{j}\in G_{i}}\frac{size(o_{j})}{size(G_{i})}.\frac {\sum_{o_{k}\in G_{i+1}}w_{j,k}dist(o_{j},o_{k})}{\sum_{k}w_{jk}}. \tag{4}\]  
Equation (4) describes the variation within one entity (graph) between timestep \(i\) and timestep \(i+1\) as the weighted sum of variations of all polygons at timestep \(i\), where these polygon variations are defined by the difference in backscatter with overlapping polygons from the next timestep (\(i+1\)), weighted by their amount of spatial overlap.  
The global variation (\(GlobVar\)) for a graph represents the sum of the variations on each timestep (Equation (5)). The value of \(GlobVar\) reflects the temporal behaviour of the entity, where high values indicate high spatio-temporal dynamics. Variation and global variation are unitless (Equations (4) and (5)).  
\[GlobVar(G)=\sum_{i=1}^{n-1}Var(G_{i},G_{i+1}). \tag{5}\]