python - 当我将获取的路网数据转换成geodataframes结构时,为什么list元素会出现在highway列?

import osmnx as ox
G = ox.graph_from_place('成都市',network_type='all')
G = ox.project_graph(G)
ox.plot_graph(G)
# 将图形转换为节点和边的GeoDataFrames类型
gdf_nodes, gdf_edges = ox.graph_to_gdfs(G)
gdf_edges

所以我得到了以下图片 [在此处输入图片描述][1] [1]:https://i.stack.imgur.com/5d5J1.png

结果是 [motorway_link, trunk]

回答1

默认情况下,OSMnx 会简化图形,除非您使用 simplify=False。有关详细信息,请参阅 https://osmnx.readthedocs.io/en/stable/osmnx.html#osmnx.simplification.simplify_graph

一些得到的合并边可能包含多个 OSM 路,如果是这样,它们的多个属性 values 存储为 list。

相似文章

随机推荐

最新文章