使用 Overpass API 查找坐标周围的多个标签
Find multiple tags around coordinates with Overpass API
给定这个搜索博物馆和画廊的立交桥查询 https://overpass-turbo.eu/s/Sle,我如何引入一种新类型的标签来搜索同一位置,例如我还想搜索 node["amenity"~"cafe|bar"]
围绕同一区域(lat: 500,53.866444
和 lon: 10.684738
周围 500 米。我尝试的所有操作都会引发错误或 returns 不完整的结果。例如,以下工作,但仅 returns 咖啡馆和酒吧,但没有博物馆。
[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" or amenity~"cafe|bar"
。
另请注意,您只是在搜索 nodes. You will miss POIs mapped as ways or relations(不过后者很少出现)。因此,要么添加对方式和关系的额外查询,要么将 node
替换为 nwr
(节点方式关系)。
给定这个搜索博物馆和画廊的立交桥查询 https://overpass-turbo.eu/s/Sle,我如何引入一种新类型的标签来搜索同一位置,例如我还想搜索 node["amenity"~"cafe|bar"]
围绕同一区域(lat: 500,53.866444
和 lon: 10.684738
周围 500 米。我尝试的所有操作都会引发错误或 returns 不完整的结果。例如,以下工作,但仅 returns 咖啡馆和酒吧,但没有博物馆。
[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" or amenity~"cafe|bar"
。
另请注意,您只是在搜索 nodes. You will miss POIs mapped as ways or relations(不过后者很少出现)。因此,要么添加对方式和关系的额外查询,要么将 node
替换为 nwr
(节点方式关系)。