2

I'm trying to query for a number of specific road types in the same request, and I can't get the syntax right at all.

Can anyone alter the following query to select "motorway", "trunk" and "primary" roads?

[timeout:25];
way["highway"="motorway"](53.5084,-2.9916,53.6,-2.8);
out body;
>;
out skel qt;

1 Answer 1

6
[timeout:25][bbox:{{bbox}}];
(
  way["highway"="motorway"];
  way["highway"="trunk"];
  way["highway"="primary"];
);
out body;
>;
out skel qt;

See it on overpass-turbo: http://overpass-turbo.eu/s/aTL

3
  • 2
    On overpass turbo: overpass-turbo.eu/s/aT3 , but note you'll also probably want motorway_link, primary_link and trunk_link .
    – til_b
    Aug 11, 2015 at 9:30
  • 1
    You can also replace the repeated ({{bbox}} by a global bbox. The first line would then read: [timeout:25][bbox:{{bbox}}]; while the other row looks like: way["highway"="motorway"];
    – mmd
    Aug 11, 2015 at 18:47
  • For the sake of completeness: you can of course also use regular expressions: overpass-turbo.eu/s/aTO
    – mmd
    Aug 11, 2015 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.