1

I am trying to query for just motor roads, highways, streets, residential roads, etc. while filtering out things such as parking lots, pedestrian paths, and park trails on OSM overpass turbo.

Currently, this is the query I'm using but I notice that it omits some major highways and residential roads.

[out:json];
nwr({{bbox}});
(way(area)["highway"~"^(motorway|trunk|primary|secondary|tertiary|motorway_link|trunk_link|primary_link|secondary_link|tertiary_link|residential|unclassified|living_street|)$"];>;);
out;
1

1 Answer 1

1

area is not the result of nwr({{bbox}}). According to your way of query you can use:

[out:json];
nwr({{bbox}});
(way ._ ["highway"~"^(motorway|trunk|primary|secondary|tertiary|motorway_link|trunk_link|primary_link|secondary_link|tertiary_link|residential|unclassified|living_street|)$"];>;);
out;

With ._ as result of nwr({{bbox}}).
One of other options would be to write directly:

[out:json];
(way({{bbox}})["highway"~"^(motorway|trunk|primary|secondary|tertiary|motorway_link|trunk_link|primary_link|secondary_link|tertiary_link|residential|unclassified|living_street|)$"];>;);
out;

Your Answer

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

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