1D and 2D Flow Routing on a Terrain

Aaron Lowe,Svend C. Svendsen,Pankaj K. Agarwal,Lars Arge
DOI: https://doi.org/10.1145/3397536.3422269
2020-09-17
Abstract:An important problem in terrain analysis is modeling how water flows across a terrain creating floods by forming channels and filling depressions. In this paper we study a number of \emph{flow-query} related problems: Given a terrain $\Sigma$, represented as a triangulated $xy$-monotone surface with $n$ vertices, a rain distribution $R$ which may vary over time, determine how much water is flowing over a given edge as a function of time. We develop internal-memory as well as I/O-efficient algorithms for flow queries. This paper contains four main results: (i) We present an internal-memory algorithm that preprocesses $\Sigma$ into a linear-size data structure that for a (possibly time varying) rain distribution $R$ can return the flow-rate functions of all edges of $\Sigma$ in $O(\rho k+|\phi| \log n)$ time, where $\rho$ is the number of sinks in $\Sigma$, $k$ is the number of times the rain distribution changes, and $|\phi|$ is the total complexity of the flow-rate functions that have non-zero values; (ii) We also present an I/O-efficient algorithm for preprocessing $\Sigma$ into a linear-size data structure so that for a rain distribution $R$, it can compute the flow-rate function of all edges using $O(\text{Sort}(|\phi|))$ I/Os and $O(|\phi| \log |\phi|)$ internal computation time. (iii) $\Sigma$ can be preprocessed into a linear-size data structure so that for a given rain distribution $R$, the flow-rate function of an edge $(q,r) \in \Sigma$ under the single-flow direction (SFD) model can be computed more efficiently. (iv) We present an algorithm for computing the two-dimensional channel along which water flows using Manning's equation; a widely used empirical equation that relates the flow-rate of water in an open channel to the geometry of the channel along with the height of water in the channel.
Computational Geometry
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to model water flow on the terrain, especially how to determine the water flow through an edge of the terrain within a given time period when the rainwater distribution changes over time. Specifically, the paper has studied several problems related to water - flow queries: 1. **Terrain Water - Flow Query**: Given a rainfall distribution \(R\) that changes over time, calculate the flow velocities of all edges as a function of time. 2. **Edge Water - Flow Query**: Given a rainfall distribution and a query edge \(e\), calculate the flow velocity of this edge under the Single Flow Direction (SFD) model. 3. **Two - Dimensional Water - Flow Network**: Given a one - dimensional water - flow network (represented as a set of edges and their flow values), calculate the two - dimensional channels along which water flows. The main contribution of the paper lies in the development of in - memory algorithms and I/O - efficient algorithms to handle these queries. Especially when high - resolution terrain data sets are becoming easily accessible, these algorithms can effectively handle the movement of data between main memory and external memory. ### Main Results 1. **In - Memory Algorithm**: - An algorithm for pre - processing the terrain \(\Sigma\) in \(O(n\log n)\) time is proposed, generating a linear - sized data structure. For a rainfall distribution \(R\) that changes over time, this algorithm can return the flow velocity functions of all edges in \(O(\rho k+|\phi|\log n)\) time, where \(\rho\) is the number of sinks in the terrain, \(k\) is the number of changes in the rainfall distribution, and \(|\phi|\) is the total complexity of non - zero flow velocity functions. - In the worst - case scenario, \(|\phi|=\Theta(n(\chi + k))\), where \(\chi\) is the height of the merge tree of the terrain, but in practical applications, \(|\phi|\) is usually smaller. 2. **I/O - Efficient Algorithm**: - Two I/O - efficient algorithms for pre - processing the terrain are proposed, using \(O(\text{Sort}(n))\) I/O operations and \(O(n\log n)\) internal computation time. The first algorithm calculates the flow velocity functions of all edges in \(O(\text{Sort}(|\phi|))\) I/O operations and \(O(|\phi|\log|\phi|)\) internal computation time. The second algorithm assumes \(\rho = O(m)\) and processes terrain water - flow queries in \(O(\text{Sort}((\chi + k)n\log n))\) I/O operations and \(O((\chi + k)n\log^{2}(kn))\) internal computation time. 3. **Edge Water - Flow Query**: - Under the single - flow - direction model, an algorithm for constructing a linear - sized data structure in \(O(n\log n)\) time is proposed. For a given edge \(e=(q, r)\) and rainfall distribution \(R\), this algorithm can calculate the flow velocity function of the edge in \(O(|R|+b_qk\log n)\) time, where \(|R|\) is the complexity of the rainfall distribution, \(b_q\) is the number of tributaries of direct rainfall, and \(k\) is the number of changes in the rainfall distribution. 4. **Two - Dimensional Water - Flow Channel**: - An algorithm is proposed. Given a one - dimensional water - flow network, it uses Manning's equation to calculate the water depth and width along the two - dimensional water - flow network. This algorithm is completed in \(O(|C|\log|C|)\) time, where \(|C|\) is the number of "wet surfaces" that are at least partially covered by water. These results not only improve computational efficiency but also provide more accurate water - flow modeling methods, which are applicable in fields such as flood - risk assessment and terrain analysis.