Osmnx python graph_to_gdfs 有时 returns 名称列中的列表,这是什么原因造成的?

The Osmnx python graph_to_gdfs sometimes returns a list in the name column, what's causing this?

我正在使用 OSmnx 创建一些漂亮的地图,我根据街道名称为街道着色,灵感来自 puntofisso(例如:如果它是一条街道,它需要是红色的,一条车道是绿色的,等等) ).我注意到有时边缘的名称不是字符串,而是列表。到目前为止我已经解决了这个问题,但是有没有可以解决这个问题的论据?或者它是由 OpenStreetMap 中的某些东西引起的?不幸的是,我在谷歌搜索中没有成功。

test_place='Kerkstraat, Delft'
# Create a graph around this address
G3 = ox.graph_from_address(test_place, network_type='all',dist=100, dist_type='bbox')
edge_attributes3 = ox.graph_to_gdfs(G3, nodes=False)
edge_attributes3.head(50)

这会在索引为 2 的行的名称列中给出 [Markt, Kerkstraat]。 我的解决方案现在只采用列表的第一个元素,但我想在代尔夫特找到 Kerkstraat,结果发现 Kerkstraat 只出现在具有名称列表的边缘中。

非常感谢任何帮助!

根据您传递给 graph_from_address 的参数,您已保留 simplify=True 默认参数化。因此你的图表 was simplified when created. From the docs 简化:

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