特定の GPS 位置の周囲にある特定のタイプのすべてのノードを見つけるための最善の解決策を見つけようとしています。
あるポイント X.xx,Y.yy 周辺のすべてのカフェ、パブ、レストラン、公園を取得したいとしましょう。
[out:json];(node[amenity][leisure](around:500,52.2740711,10.5222147););out;
アメニティとレジャーの両方であるノードを検索することは不可能だと思うので、これは何も返しません。
[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;
これらの解決策はエラーになります (400: Bad Request)
私が見つけた唯一の有効な解決策は、非常に長いクエリになる次の解決策です
[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;
複数の「around」ステートメントを使用しない簡単な解決策はありませんか?
編集:少し短いこれを見つけました。しかし、まだ複数の「周り」のステートメントがあります。
[out:json];(node["leisure"~"park"](around:400,52.2784715,10.5249662);node["amenity"~"cafe|pub|restaurant"](around:400,52.2784715,10.5249662););out;