Home > Blockchain >  When I convert the obtained road network data into a geodataframes structure, why does the list elem
When I convert the obtained road network data into a geodataframes structure, why does the list elem

Time:05-16

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

So I got the following image [enter image description here][1] [1]: https://i.stack.imgur.com/5d5J1.png
the result was [motorway_link, trunk]

CodePudding user response:

By default, OSMnx simplifies the graph unless you use simplify=False. See documentation for details:

Some of the resulting consolidated edges may comprise multiple OSM ways, and if so, their multiple attribute values are stored as a list.

  • Related