给出这个立交桥查询 https://overpass-turbo.eu/s/Sle ,搜索博物馆和画廊,我如何引入一种新型标签来搜索同一位置,例如我还想搜索 node["amenity"~"cafe|bar"]
围绕同一区域(lat: 500,53.866444
和 lon: 10.684738
周围 500 米。我尝试的所有操作都会引发错误或返回不完整的结果。例如,以下工作,但只返回咖啡馆和酒吧,但不返回博物馆。
[out:json];
node["tourism"~"museum|gallery"](around:500,53.866444, 10.684738);
node["amenity"~"cafe|bar"](around:500,53.866444, 10.684738);
out center;
最佳答案
您需要合并两个结果集:
[out:json];
(
node["tourism"~"museum|gallery"](around:500,53.866444, 10.684738);
node["amenity"~"cafe|bar"](around:500,53.866444, 10.684738);
);
out center;
参见 https://overpass-turbo.eu/s/Ss6 .
或者尝试在 overpass-turbo 使用向导,例如搜索 tourism~"museum|gallery"或 amenity~"cafe|bar"
。
另请注意,您只是在搜索 nodes .您会错过映射为 ways 的兴趣点或 relations (尽管后者很少发生)。因此,要么添加对方式和关系的额外查询,要么将 node
替换为 nwr
(节点方式关系)。
关于openstreetmap - 使用 Overpass API 查找坐标周围的多个标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61025327/