IDEAS home Printed from https://ideas.repec.org/a/gam/jdataj/v5y2020i1p8-d309637.html
   My bibliography  Save this article

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

Author

Listed:
  • Nicolas Cadieux

    (Department of Geography, McGill University, Montreal, QC H3A 0B9, Canada)

  • Margaret Kalacska

    (Department of Geography, McGill University, Montreal, QC H3A 0B9, Canada)

  • Oliver T. Coomes

    (Department of Geography, McGill University, Montreal, QC H3A 0B9, Canada)

  • Mari Tanaka

    (Graduate School of Economics, Hitotsubashi University, Tokyo 186-8601, Japan)

  • Yoshito Takasaki

    (Graduate School of Economics, University of Tokyo, Tokyo 113-0033, Japan)

Abstract

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.

Suggested Citation

  • Nicolas Cadieux & Margaret Kalacska & Oliver T. Coomes & Mari Tanaka & Yoshito Takasaki, 2020. "A Python Algorithm for Shortest-Path River Network Distance Calculations Considering River Flow Direction," Data, MDPI, vol. 5(1), pages 1-14, January.
  • Handle: RePEc:gam:jdataj:v:5:y:2020:i:1:p:8-:d:309637
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2306-5729/5/1/8/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2306-5729/5/1/8/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Coomes, Oliver T. & Takasaki, Yoshito & Abizaid, Christian & Arroyo-Mora, J. Pablo, 2016. "Environmental and market determinants of economic orientation among rain forest communities: Evidence from a large-scale survey in western Amazonia," Ecological Economics, Elsevier, vol. 129(C), pages 260-271.
    2. Boeing, Geoff, 2017. "OSMnx: New Methods for Acquiring, Constructing, Analyzing, and Visualizing Complex Street Networks," SocArXiv q86sd, Center for Open Science.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Polina Lemenkova, 2022. "Handling Dataset with Geophysical and Geological Variables on the Bolivian Andes by the GMT Scripts," Data, MDPI, vol. 7(6), pages 1-18, June.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Matteo Böhm & Mirco Nanni & Luca Pappalardo, 2022. "Gross polluters and vehicle emissions reduction," Nature Sustainability, Nature, vol. 5(8), pages 699-707, August.
    2. Lorenzo Barbieri & Roberto D’Autilia & Paola Marrone & Ilaria Montella, 2023. "Graph Representation of the 15-Minute City: A Comparison between Rome, London, and Paris," Sustainability, MDPI, vol. 15(4), pages 1-14, February.
    3. Miotti, Marco & Needell, Zachary A. & Jain, Rishee K., 2023. "The impact of urban form on daily mobility demand and energy use: Evidence from the United States," Applied Energy, Elsevier, vol. 339(C).
    4. Shiqin Liu & Carl Higgs & Jonathan Arundel & Geoff Boeing & Nicholas Cerdera & David Moctezuma & Ester Cerin & Deepti Adlakha & Melanie Lowe & Billie Giles-Corti, 2021. "A Generalized Framework for Measuring Pedestrian Accessibility around the World Using Open Data," Papers 2105.08814, arXiv.org.
    5. Ospina, Juan P. & Duque, Juan C. & Botero-Fernández, Verónica & Montoya, Alejandro, 2022. "The maximal covering bicycle network design problem," Transportation Research Part A: Policy and Practice, Elsevier, vol. 159(C), pages 222-236.
    6. Brinkley, Catherine & Raj, Subhashni, 2022. "Perfusion and urban thickness: The shape of cities," Land Use Policy, Elsevier, vol. 115(C).
    7. Jorge Ubirajara Pedreira Junior & Antônio Nélson Rodrigues da Silva & Cira Souza Pitombo, 2022. "Car-Free Day on a University Campus: Determinants of Participation and Potential Impacts on Sustainable Travel Behavior," Sustainability, MDPI, vol. 14(6), pages 1-20, March.
    8. Begazo Curie, Karin & Mertens, Kewan & Vranken, Liesbet, 2021. "Tenure regimes and remoteness: When does forest income reduce poverty and inequality? A case study from the Peruvian Amazon," Forest Policy and Economics, Elsevier, vol. 128(C).
    9. Geoff Boeing, 2020. "Planarity and street network representation in urban form analysis," Environment and Planning B, , vol. 47(5), pages 855-869, June.
    10. Aston, Laura & Currie, Graham & Kamruzzaman, Md. & Delbosc, Alexa & Brands, Ties & van Oort, Niels & Teller, David, 2021. "Multi-city exploration of built environment and transit mode use: Comparison of Melbourne, Amsterdam and Boston," Journal of Transport Geography, Elsevier, vol. 95(C).
    11. Alves d'Acampora, Bárbara Heliodora & Maraschin, Clarice & Taufemback, Cleiton Guollo, 2023. "Landscape ecology and urban spatial configuration: Exploring a methodological relationship. Application in Pelotas, Brazil," Ecological Modelling, Elsevier, vol. 486(C).
    12. Bowater, David & Stefanakis, Emmanuel, 2023. "Extending the Adapted PageRank Algorithm centrality model for urban street networks using non-local random walks," Applied Mathematics and Computation, Elsevier, vol. 446(C).
    13. Boeing, Geoff & Pilgram, Clemens & Lu, Yougeng, 2024. "Urban Street Network Design and Transport-Related Greenhouse Gas Emissions around the World," SocArXiv r32vj, Center for Open Science.
    14. Sadek, Bassel & Doig Godier, Jean & Cassidy, Michael J & Daganzo, Carlos F, 2022. "Traffic signal plans to decongest street grids," Transportation Research Part B: Methodological, Elsevier, vol. 162(C), pages 195-208.
    15. Olga L Sarmiento & Andrés F Useche & Daniel A Rodriguez & Iryna Dronova & Oscar Guaje & Felipe Montes & Ivana Stankov & Maria Alejandra Wilches & Usama Bilal & Xize Wang & Luis A Guzmán & Fabian Peña , 2021. "Built environment profiles for Latin American urban settings: The SALURBAL study," PLOS ONE, Public Library of Science, vol. 16(10), pages 1-25, October.
    16. Ali Enes Dingil & Federico Rupi & Joerg Schweizer & Zaneta Stasiskiene & Kasra Aalipour, 2019. "The Role of Culture in Urban Travel Patterns: Quantitative Analyses of Urban Areas Based on Hofstede’s Culture Dimensions," Social Sciences, MDPI, vol. 8(8), pages 1-12, July.
    17. Geoff Boeing, 2020. "Urban Street Network Analysis in a Computational Notebook," REGION, European Regional Science Association, vol. 7, pages 39-51.
    18. Geoff Boeing, 2020. "A multi-scale analysis of 27,000 urban street networks: Every US city, town, urbanized area, and Zillow neighborhood," Environment and Planning B, , vol. 47(4), pages 590-608, May.
    19. Büsing, Christina & Comis, Martin & Schmidt, Eva & Streicher, Manuel, 2021. "Robust strategic planning for mobile medical units with steerable and unsteerable demands," European Journal of Operational Research, Elsevier, vol. 295(1), pages 34-50.
    20. Milovan Kovač & Snežana Tadić & Mladen Krstić & Miloš Veljović, 2023. "A Methodology for Planning City Logistics Concepts Based on City-Dry Port Micro-Consolidation Centres," Mathematics, MDPI, vol. 11(15), pages 1-21, July.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jdataj:v:5:y:2020:i:1:p:8-:d:309637. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.