A Python Algorithm for Shortest-Path River Network Distance Calculations Considering River Flow Direction

Vector based shortest path analysis in geographic information system (GIS) is well established for road networks. Even though these network algorithms can be applied to river layers, they do not generally consider the direction of flow. This paper presents a Python 3.7 program (upstream_downstream_s...

Full description

Saved in:
Bibliographic Details
Published inData (Basel) Vol. 5; no. 1; p. 8
Main Authors Cadieux, Nicolas, Kalacska, Margaret, Coomes, Oliver T., Tanaka, Mari, Takasaki, Yoshito
Format Journal Article
LanguageEnglish
Published MDPI AG 01.03.2020
Subjects
Online AccessGet full text
ISSN2306-5729
2306-5729
DOI10.3390/data5010008

Cover

More Information
Summary:Vector based shortest path analysis in geographic information system (GIS) is well established for road networks. Even though these network algorithms can be applied to river layers, they do not generally consider the direction of flow. This paper presents a Python 3.7 program (upstream_downstream_shortests_path_dijkstra.py) that was specifically developed for river networks. It implements multiple single-source (one to one) weighted Dijkstra shortest path calculations, on a list of provided source and target nodes, and returns the route geometry, the total distance between each source and target node, and the total upstream and downstream distances for each shortest path. The end result is similar to what would be obtained by an “all-pairs” weighted Dijkstra shortest path algorithm. Contrary to an “all-pairs” Dijkstra, the algorithm only operates on the source and target nodes that were specified by the user and not on all of the nodes contained within the graph. For efficiency, only the upper distance matrix is returned (e.g., distance from node A to node B), while the lower distance matrix (e.g., distance from nodes B to A) is not. The program is intended to be used in a multiprocessor environment and relies on Python’s multiprocessing package.
ISSN:2306-5729
2306-5729
DOI:10.3390/data5010008