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

What happened to the POIs-module in OSMnx - and what to use now?

我想从 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', amenities=['charging_station'])

但这会导致:AttributeError: module 'osmnx' has no attribute 'pois_from_place'

在代码中搜索,我在版本 0.16.2 到 1.0.0 的变更日志中找到了这一行:- remove deprecated pois module

所以 - 有没有人有关于如何例如获取德国所有设施为“charging_station”的节点列表?

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