【发布时间】:2020-11-21 10:33:12
【问题描述】:
使用 OSmnx 计算两个位置之间的最短街道距离的最佳方法是什么?例如,如果我想寻找一条穿越美国的路线?
这样做似乎很麻烦,考虑到我的计算资源,也许不可能。
G = ox.graph_from_place('USA', network_type='drive')
orig_node = ox.get_nearest_node(G, (lat, lon))
dest_node = ox.get_nearest_node(G, (lat, lon))
nx.shortest_path_length(G, orig_node, dest_node, weight='length')
有什么有效的方法可以做到这一点?
我确实看到了这个帖子..
python osmnx - extract only big freeways of a country
但即使只是美国的高速公路也会创建一个庞大的网络
【问题讨论】:
标签: python openstreetmap geopandas osmnx