A recursive algorithm for calculating the longest flow path and its iterative implementation. (September 2020) - Cho, Huidae
Abstract: The longest flow path is widely used for studying hydrology. Traditionally, both or either of upstream and downstream flow length rasters are required to calculate the longest flow path. When processing multiple subwatersheds, this approach requires separate calculations of the downstream flow length raster for all the subwatersheds. However, raster computation involves a lot of disk input/output and can be slow. By defining the longest flow path recursively and introducing a branching strategy based on Hack's law, this study proposes a new longest flow path algorithm that computes as few rasters as possible to reduce computational time and improve efficiency. To avoid stack overflows by excessive recursion, its iterative counterpart algorithm was also proposed. The proposed algorithms were implemented as a GRASS GIS module. Benchmark experiments proved that the new module outperforms an existing tool for a commercial GIS. Highlights: A new recursive algorithm for calculating the longest flow path is proposed. The iterative version of the recursive algorithm is also presented for stack safety. The proposed algorithms are implemented as a new GRASS GIS module. The new module was efficient and outperformed the Longest Flow Path tool in the Arc Hydro toolbox for ArcGIS Pro.