如何使用python从Openstreet地图中提取道路网络?

问题描述

我想用Python从Openstreetmap提取道路网络的几何形状。

这怎么办? 我以前没有做过这样的事情,我们将不胜感激!

所需的输出

enter image description here

谢谢!

解决方法

根据Warped1的建议,使用osmnx

这是一种获取街道网络信息的方法:

import osmnx as ox
G = ox.graph_from_place('Paris,France')
ox.plot_graph(G)

输出: enter image description here

Here是有关软件包的更多信息,也是与您所拥有的软件包相似的示例。

干杯!