# Computing River Floods Using Massive Terrain Data

## Abstract

Many times in history, river floods have resulted in huge catastrophes. To reduce the negative outcome of such floods, it is important to predict their extent before they happen. For this reason, specialists use algorithms that model river floods on digital terrains datasets. Nowadays, massive terrain datasets have become widely available. As flood modeling is an important part for a wide range of applications, it is crucial to process such datasets fast even with standard computers. Yet, these datasets can be several times larger than the main memory of a standard computer. Unfortunately, existing flood-modeling algorithms cannot handle this situation efficiently. Hence they have to sacrifice output quality for time performance, or vice versa.

In this paper, we present a novel algorithm that, unlike any previous approach, can both provide high-quality river flood modeling and handle massive terrain data efficiently. More than that, we redesigned an existing popular flood-modeling method (approved by European Union and used by authorities in Denmark) so that it can efficiently process huge terrain datasets. Given a raster terrain \(\mathcal {G}\) and a subset of its cells representing a river network, both algorithms estimate for each cell in \(\mathcal {G}\) the height that the river should rise for the cell to get flooded. Based on our design, both algorithms can process terrain datasets that are much larger than the main memory of a computer. For an input raster that consists of *N* cells, and which is so large that it can only be stored in the hard disk, each of the described algorithms can produce its output with only \(O(\mathrm {sort}(N))\) transfers of data blocks between the disk and the main memory. Here \(\mathrm {sort}(N)\) denotes the minimum number of data transfers needed for sorting *N* elements stored on disk. We implemented both algorithms, and compared their output with data acquired from a real flood event. We show that our new algorithm models the real event quite accurately, more accurately than the existing popular method. We evaluated the efficiency of the algorithms in practice by conducting experiments on massive datasets. Each algorithm could process a dataset of 268 GB size on a computer with only 22 GB working main memory (twelve times smaller than the dataset itself) in at most 31 h.

## Keywords

Main Memory Voronoi Diagram Source Cell River Network Flow Graph## References

- 1.Agarwal, P.K., Arge, L., Yi, K.: I/O-efficient batched union-find and its applications to terrain analysis. In: Proceedings of the 22nd Annual Symposium on Computational Geometry, pp. 167–176 (2006)Google Scholar
- 2.Agarwal, P.K., Arge, L., Yi, K.: I/O-efficient construction of constrained delaunay triangulations. In: Proceedings of the 13th Annual European Symposium on Algorithms, pp. 355–366 (2005)Google Scholar
- 3.Aggarwal, A., Vitter, J.S.: The input/output complexity of sorting and related problems. Commun. ACM
**31**(9), 1116–1127 (1988)MathSciNetCrossRefGoogle Scholar - 4.Alexander, C., Arge, L., Bøcher, P.K., Revsbæk, M., Sandel, B., Svenning, J.-C., Tsirogiannis, C., Yang, J.: Computing River Floods Using Massive Terrain Data. http://madalgo.au.dk/fileadmin/madalgo/OA_PDF_s/C401.pdf/
- 5.Arge, L., Toma, L., Vitter, J.S.: I/O-efficient algorithms for problems on grid-based terrains. ACM J. Exp. Algorithmics
**6**(1) (2001)Google Scholar - 6.Brefeld, U., Scheffer, T.: AUC maximizing support vector learning. In: Proceedings of the ICML Workshop on ROC Analysis in Machine Learning (2005)Google Scholar
- 7.Danner, A., Mølhave, T., Yi, K., Agarwal, P.K., Arge, L., Mitasova, H.: TerraStream: from elevation data to watershed hierarchies. In: Proceedings of the 15th ACM International Symposium on Advances in Geographic Information Science (ACM GIS), pp. 212–219 (2007)Google Scholar
- 8.The Dartmouth Flood Observatory Webpage. http://floodobservatory.colorado.edu/
- 9.Encyclopaedia Britannica Webpage, Pakistan Floods of 2010. http://www.britannica.com/EBchecked/topic/1731329/Pakistan-Floods-of-2010
- 10.Elevation Model of Denmark, Geodata Agency of the Danish Ministry of Environment. http://gst.dk/emner/frie-data/hvilke-data-er-omfattet/hvilke-data-er-frie/dhm-danmarks-hoejdemodel/
- 11.Goodrich, M.T., Tsay, J.J., Vengroff, D.E., Vitter, J.S.: External-memory computational geometry. In: Proceedings of the 34th IEEE Annual Symposium on Foundations of Computer Science (FOCS), pp. 714–723 (1993)Google Scholar
- 12.Kronvang, B., Søndergaard, M., Hoffmann, C.C., Thodsen, H., Bering Ovesen, N., Stjernholm, M., Nielsen, C.B., Kjærgaard, C., Schønfeldt, B., Levesen, B.: Etablering af P-Ådale. Technical report 840, National Environmental Research Institute of Denmark (2011)Google Scholar
- 13.Rodriguez, E., Morris, C.S., Belz, J.E.: A global assessment of the SRTM performance. Photogram. Eng. Remote Sens.
**72**(3), 249–260 (2006)CrossRefGoogle Scholar - 14.TPIE, the Templated Portable I/O Environment. http://www.madalgo.au.dk/tpie/