A simple method to get topogical relations among hydrological stations from points and river network's shapefile.
Open command line interface, run command pip install hydrotopo==0.1.2.
When install is completed, run calcstream --help to see all configurations of command parameters:
Options:
--outdated TEXT decide regenerate cache files or not
--nodes_path TEXT path of nodes shape file
--river_path TEXT path of river vector shape file
--cur_sta TEXT number of current station
--up_sta TEXT number of station which will be judge in mainstream or
tributary in upstream watershed of current station
--cutoff TEXT amount of stations which user want to limit
--upstream TEXT output upstream stations graph of current station
--downstream TEXT output list of downstream stations of current station
-h, --help Show this message and exit
Example Command:
calcstream --nodes_path C:\Users\UserName\Desktop\test_nodes.shp --river_path C:\Users\UserName\Desktop\test_river.shp --cur_sta 0 --upstream True --cutoff 6
Means: From station 0, calculate upstream stations of it, and you can date back to up to 6 stations
Output result:
Yang Wang, Wenyu Ouyang, Jingyuan Huang, Lei Ye, Chi Zhang, Automatic analysis method for topological relationship between river network and hydrological stations, Environmental Modelling & Software, Volume 192, 2025, 106558, ISSN 1364-8152, https://doi.org/10.1016/j.envsoft.2025.106558.
