0

我想从 osmnx 下载地图数据以在 (kepler.gl)[https://kepler.gl/demo] 中使用它,
但它只接受 csv、json 和 geojson 格式的数据。

我努力了

import osmnx as ox

G = ox.graph_from_place('taian,shandong', network_type='drive')

ox.plot_graph(G)

nodes,edges=ox.graph_to_gdfs(G)
nodes.to_file('nodes_.geojson',driver='GeoJSON')  
edges.to_file('edges_.geojson',driver='GeoJSON')

但边缘发生错误

“无效的字段类型类:'list'”

如何从 osmnx 获取 csv 或 json 或 geojson?

4

0 回答 0