OSMnx 中的 POIs 模块发生了什么 - 现在该使用什么?

发布于 2025-01-15 18:51:23 字数 577 浏览 0 评论 0原文

我想从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇女薄笑 2025-01-22 18:51:23

是的,这不久前已被弃用并最终被删除。 geometry 模块取代了它并提供了此功能。请参阅文档 https://osmnx.readthedocs.io/en /stable/osmnx.html#module-osmnx.geometries

Yes 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文