嗨,我从法国的一个地方下载了drive_服务的图表,我正在尝试获取特定边缘的长度。。有什么办法吗?
import osmnx as ox
name_place = 'Aubervilliers, France'
graph_aubervillier = ox.graph_from_address( name_place ,network_type="drive_service")
graph_aubervillier[348206084][256242027]
AtlasView({0: {'highway': 'residential', 'geometry': , 'osmid': 31297114, 'junction': 'roundabout', 'oneway': True, 'length': 26.204}})
当您调用
graph_aubervillier[348206084][256242027]
时,您将返回这两个节点之间所有可能的边。注意,图是一个多有向图,在两个节点之间可以有多条边。在因此,如果要获取两个节点之间的所有长度,则需要迭代AtlasView对象:
相关问题 更多 >
编程相关推荐