Pyrosm 加载节点和边 - 输入必须是有效的几何对象

Cir*_*exe 6 python graph openstreetmap shapely

大家早上好,

我正在尝试使用 Pyrosm 库的文档加载 .pbf 文件。

我的代码如下。

import pyrosm

# Get filepath to test PBF dataset
fp = pyrosm.get_data("wisconsin")

# Initialize the OSM object 
osm = pyrosm.OSM(fp)

nodes, edges = osm.get_network(nodes=True)

print(f"Nodes {nodes} and edges {edges}")
Run Code Online (Sandbox Code Playgroud)

我收到以下错误,该错误似乎来自库本身。

类型错误:输入必须是有效的几何对象:MULTILINESTRING ((-89.5 44.5, -89.5 44.5), (-89.5 44.5, -89.5 44.5), (-89.5 44.5, -89.5 44.5), (-89.5 44.5, -89.5 44.5) , (-89.5 44.5, -89.5 44.5))

以前有人遇到过这个问题吗?

多谢