Search code examples
openstreetmapoverpass-api

How to write a query with two requirements in overpass turbo?


I am trying to retrieve a bus route for specific bus services. How do I include two key in overpass query such that I could find the bus routes of specific bus services? For example, I would like to find the bus routes of bus Svc 3 ?

How do I include two features:

"route" = "bus"

"name" = "Svc 3"

QUERY

node["route"="bus",](around:{{radius}},{{geocodeCoords:'country'}});
way["route"="bus"](around:{{radius}},{{geocodeCoords:'country'}});
relation["route"="bus"](around:{{radius}},{{geocodeCoords:'country'}});

Solution

  • See the documentation of the query statement. To specify multiple filters just add them one after the other:

    relation["route"="bus"]["name"="Svc 3"](around:{{radius}},{{geocodeCoords:'country'}});