From 3dc874a4946a813c921d0c707b52847a92a01fe1 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Sat, 5 Dec 2020 14:33:40 +0100 Subject: [PATCH] Added description of the algorithm + acknowledge the authors of the paper. --- terrainlib/rivermapper.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/terrainlib/rivermapper.py b/terrainlib/rivermapper.py index 9e09d9d..2de45b5 100644 --- a/terrainlib/rivermapper.py +++ b/terrainlib/rivermapper.py @@ -2,6 +2,16 @@ import numpy as np import numpy.random as npr from collections import defaultdict +# This file provide functions to construct the river tree from an elevation model. +# Based on a research paper: +# | Cordonnier, G., Bovy, B., and Braun, J.: +# | A versatile, linear complexity algorithm for flow routing in topographies with depressions, +# | Earth Surf. Dynam., 7, 549–562, https://doi.org/10.5194/esurf-7-549-2019, 2019. +# Big thanks to them for releasing this paper under a free license ! :) + +# The algorithm here makes use of most of the paper's concepts, including the Planar Boruvka algorithm. +# Only flow_local and accumulate_flow are custom algorithms. + def flow_local(plist): """ Determines a flow direction based on denivellation for every neighbouring node.