获取所有节点

问题描述:

我目前正在开发一个项目,要求我使用特定的标记获取以前结果的所有节点。 下面的代码获取了所有节点的方式,但我无法弄清楚如何只获取具有特定标签的节点。获取所有节点

[out:json][timeout:25]; 

(way["railway"="tram"](47.36889,8.55407,47.36973,8.55553)); 

out; 
>; 
//get all nodes within the result with a certain tag 
out; 

尝试此查询:

[out:json][timeout:25]; 

way["railway"="tram"](47.36889,8.55407,47.36973,8.55553); 
>; 
node._["public_transport"="stop_position"]; 
out; 

它查询与给定边界框railway=tram标签的所有方式。然后它执行递增(>;)以获取这些方式的所有节点。之后,它使用public_transport=stop_position标签搜索默认集_中的节点。

+1

非常感谢!为了达到这个目标,我一直在苦苦挣扎。 – Chester

+1

你也可以写:'way [“railway”=“tram”](47.36889,8.55407,47.36973,8.55553); node(w)[“public_transport”〜“stop_position”];' – mmd