OSMnx 中的 POIs 模块发生了什么 - 现在该使用什么?
我想从 OSM 中提取数据,类似于这篇博文: https://blogs.sap.com/2020/01/20/where-to-not-charge-my-car-openstreetmap-pois-in-sap-hana/
第一个示例之一是:
gdf_poi = ox.pois_from_place('Germany', Facilities=['charging_station'])
但这会导致: AttributeError: module 'osmnx' 没有属性 'pois_from_place'
在代码中搜索,我在版本 0.16.2 到 1.0.0 的变更日志中找到了这一行: - 删除已弃用的 pois 模块
所以 - 任何人都这样做有一个关于如何获取德国具有便利设施“charging_station”的所有节点列表的示例吗?
I want to extract data from OSM, similar to this blogpost:
https://blogs.sap.com/2020/01/20/where-to-not-charge-my-car-openstreetmap-pois-in-sap-hana/
One of the first examples is:
gdf_poi = ox.pois_from_place('Germany', amenities=['charging_station'])
But this leads to: AttributeError: module 'osmnx' has no attribute 'pois_from_place'
Searching in the code I find this line in the changelog from version 0.16.2 to 1.0.0: - remove deprecated pois module
So - does anyone has an example on how to e.g. get a list of all nodes with amenity "charging_station" in Germany?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这不久前已被弃用并最终被删除。
geometry
模块取代了它并提供了此功能。请参阅文档 https://osmnx.readthedocs.io/en /stable/osmnx.html#module-osmnx.geometriesYes this was deprecated a while back and eventually removed. The
geometries
module replaced it and offers this functionality. See the documentation https://osmnx.readthedocs.io/en/stable/osmnx.html#module-osmnx.geometries