User:Vicuna/OverpassAPI/PublicTransportNetworks

From OpenStreetMap Wiki
Jump to: navigation, search

Go to the Overpass API website:

Insert the following query to get all relations and the associated ways and nodes of a public transport network. In this case all routes with the network-tag "VBB" (Verkehrsverbund Berlin-Brandenburg) are included.

<query type="relation">
  <has-kv k="network" regv="VBB"/>
</query>
<recurse type="relation-way"/>
<recurse type="way-node"/>
<print/>

<query type="relation">
  <has-kv k="network" regv="VBB"/>
</query>
<recurse type="relation-way"/>
<print/>

<query type="relation">
  <has-kv k="network" regv="VBB"/>
</query>
<recurse type="relation-node"/>
<print/>

<query type="relation">
  <has-kv k="network" regv="VBB"/>
  <has-kv k="public_transport" v="stop_area"/>
</query>
<recurse type="relation-node"/>
<recurse type="node-relation"/>
<print/>

<query type="relation">
  <has-kv k="network" regv="VBB"/>
</query>
<print/>