worldbank / GOSTnets

Convenience wrapper for networkx analysis using geospatial information, focusing on OSM
https://worldbank.github.io/GOSTnets/
MIT License
24 stars 15 forks source link

Commiting OSM_to_network routine changes that correctly integrate ferry terminals into networks #32

Closed rbanick closed 3 years ago

rbanick commented 3 years ago

Ferry terminals are areas and hence ignored by the existing OSM_to_network routine. This results in ferry routes being disconnected from road or path networks they are linked to via the terminals.

The additional code converts the terminal area outline to a Linestring and integrates it into the network as a pier.

A hacky solution but probably realistic in outcome, as ferries usually involve waiting and piers are generally coded for walking.

andresfchamorro commented 3 years ago

This doesn't make any checks for connectivity, right?

rbanick commented 3 years ago

Correct.

My observation after a desk review in Bangladesh was that in BD, if an amenity=ferry_terminal way exists, it was indeed connected. Therefore this solved my use case.

A connectivity check would make sense but I haven't dug around the code enough to understand how to build that. As things stand, ferry routes are not checked for connectivity either, so if we push for this we should apply it to both sets of features.

d3netxer commented 3 years ago

seem good enough to merge, and we have additional ideas to think about checking for connectivity in the future. Maybe like adding a centroid node for the ferry terminal and snapping nearby roads within a certain radius?