小编Wil*_*ley的帖子

如何在一个位置搜索多个标签?

我正在试图弄清楚在给定的GPS位置周围找到某些类型的所有节点的最佳解决方案.

假设我希望将所有咖啡馆,酒吧,餐馆和公园都围绕给定点X.xx,Y.yy.

[out:json];(node[amenity][leisure](around:500,52.2740711,10.5222147););out;
Run Code Online (Sandbox Code Playgroud)

这没有任何回报,因为我认为它搜索既不可能的舒适和休闲节点.

[out:json];(node[amenity or leisure](around:500,52.2740711,10.5222147););out;
[out:json];(node[amenity,leisure](around:500,52.2740711,10.5222147););out;
[out:json];(node[amenity;leisure](around:500,52.2740711,10.5222147););out;
[out:json];(node[amenity|leisure](around:500,52.2740711,10.5222147););out;
[out:json];(node[amenity]|[leisure](around:500,52.2740711,10.5222147););out;
[out:json];(node[amenity],[leisure](around:500,52.2740711,10.5222147););out;
[out:json];(node[amenity];[leisure](around:500,52.2740711,10.5222147););out;
Run Code Online (Sandbox Code Playgroud)

这些解决方案导致错误(400:错误请求)

我找到的唯一可行解决方案是以下一个导致查询非常长的解决方案

[out:json];(node[amenity=cafe](around:500,52.2740711,10.5222147);node[leisure=park](around:500,52.2740711,10.5222147);node[amenity=pub](around:500,52.2740711,10.5222147);node[amenity=restaurant](around:500,52.2740711,10.5222147););out;
Run Code Online (Sandbox Code Playgroud)

没有多个"周围"声明,是否有更简单的解决方案?

编辑:发现这个有点短.但仍有多个"周围"的陈述.

[out:json];(node["leisure"~"park"](around:400,52.2784715,10.5249662);node["ameni??ty"~"cafe|pub|restaurant"](around:400,52.2784715,10.5249662););out;
Run Code Online (Sandbox Code Playgroud)

overpass-api

4
推荐指数
1
解决办法
2366
查看次数

标签 统计

overpass-api ×1