peartree
peartree copied to clipboard
Multimodal graph linking not working?
Hi again @kuanb,
I continued digging around (see #124) and tested using the existing_graph
-parameter to link walking and PT graphs together. I found that the stops around transit areas are connected together, but edges that would link stops to road network does not seem to work (as in the example below). Is this expected behavior?
The code that I used to produce the graph is:
G = pt.load_feed_as_graph(feed, start, end,
walk_speed_kmph=walk_speed,
impute_walk_transfers=False,
use_multiprocessing=True,
existing_graph=walk_graph)
Interesting - I will look into this further! Thank you for flagging!
I looked into this, and this is connected to the 'hanging nodes' issue from the peartree with walk tutorial: http://kuanbutts.com/2018/12/24/peartree-with-walk-network/
When a network is obtained via OSMNX the node IDs are ints, so we want to preserve these ints instead of converting them to strings. Or else, we will be creating hanging nodes and also be ignoring nearest nodes that come from the existing graph. I am submitting this pull request: https://github.com/kuanb/peartree/pull/164