Manish
Manish

Reputation: 71

Extracting nodes from highways

I am using overpass turbo to extract nodes from highways(=motorway). Below is the code that I am using. However, this code gives me all the nodes in the bounding box and does not filter the highways.

[out:xml];
(
(way(39.90,32.83,39.96,32.89);)->.a;
((way.a["highway"="motorway"]);)->.b;
((way.a["highway"="motorway_link"]);)->.b;
);
(.b;>;);
out body qt;

Upvotes: 0

Views: 264

Answers (2)

scai
scai

Reputation: 21469

Try this query instead:

[out:xml]
[timeout:25]
;
(
  way
    ["highway"="motorway"]
    (39.90,32.83,39.96,32.89);
  way
    ["highway"="motorway_link"]
    (39.90,32.83,39.96,32.89);
);
out body;
>;
out skel qt;

You can view it on overpass turbo. Note that it doesn't return any results because the given bounding box doesn't contain motorways. Either increase the bounding box size or choose a different highway value, for example highway=primary.

Upvotes: 1

tyr
tyr

Reputation: 1837

see my answer posted on help.osm.org: https://help.openstreetmap.org/questions/41754/extracting-node-from-highways

Upvotes: 2

Related Questions