peartree icon indicating copy to clipboard operation
peartree copied to clipboard

Multimodal graph linking not working?

Open HTenkanen opened this issue 5 years ago • 2 comments

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?

image

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)

HTenkanen avatar Oct 01 '19 17:10 HTenkanen

Interesting - I will look into this further! Thank you for flagging!

kuanb avatar Oct 08 '19 17:10 kuanb

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

d3netxer avatar Dec 29 '20 02:12 d3netxer