使用Overpass API在坐标周围查找多个标签

问题描述 投票:1回答:1

给出了用于搜索博物馆和美术馆的立交查询https://overpass-turbo.eu/s/Sle,我如何引入一种新型标签来在相同位置附近进行搜索,例如,我也想在同一区域附近搜索node["amenity"~"cafe|bar"](500距离lat: 500,53.866444lon: 10.684738米不远。我尝试过的所有操作都会引发错误或返回不完整的结果。例如,以下作品,但仅返回咖啡馆和酒吧,而没有博物馆。

[out:json];
  node["tourism"~"museum|gallery"](around:500,53.866444, 10.684738);
  node["amenity"~"cafe|bar"](around:500,53.866444, 10.684738);
  out center;
openstreetmap overpass-api
1个回答
0
投票

您需要组合两个结果集:

[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

或者,例如,通过搜索tourism~"museum|gallery" or amenity~"cafe|bar",尝试在天桥涡轮增压器上使用向导。

也请注意,您只是在搜索nodes。您将错过映射为waysrelations的POI(尽管后者很少出现)。因此,要么添加其他查询方式和关系,要么将node替换为nwr(节点方式关系)。

© www.soinside.com 2019 - 2024. All rights reserved.