Python OSMNX-仅提取一个国家的大型高速公路
我知道可以通过OSMNX Python软件包提取城市的道路网络。 See details at https://geoffboeing.com/2016/11/osmnx-python -Street-Networks/。
paris_network = ox.gdf_from_place("Paris")
但是,假设我不想要那种高度的细节,而只是整个国家的大型高速公路。我正在寻找类似的东西:
france_big_expressway_network = ox.gdf_from_place("France", road_type = "freeway")
我想这可能来自“基础架构”参数,但是作为新手,我真的没有得到如何精确使用它。
I know it is possible to extract the road network of a city via the OSMNX python package. See details at https://geoffboeing.com/2016/11/osmnx-python-street-networks/ .
paris_network = ox.gdf_from_place("Paris")
But, let's say I do not want that level of high details, but rather only big freeways of a whole country. I'm looking for something like :
france_big_expressway_network = ox.gdf_from_place("France", road_type = "freeway")
I guess it might comes from the "infrastructure" argument but as a newbie I really do not get how to use it precisely.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以使用OSMNX进行此操作:
另请参阅此答案如果您想通过多个高速公路标签值过滤(例如,保留所有高速公路和主要道路)。
有关更多用法详细信息,请参见 osmnx docs 有关更多用法详细信息。
Yes you can do this with OSMnx:
See also this answer if you'd like to filter by multiple highway tag values (e.g., retain all motorways AND primary roads).
See the OSMnx docs for more usage details.