Query nodes and attributes of parent waysOverpass API: Get coordinates of postal boundaryCorrect order of nodes in Overpass queryHow can I get a relation with multiple ways as members in addition to the members with Overpass QL?Is there a Service to get only nodes from OSM?Query for WAY that connects two INTERSECTIONSA way to find all footway and street interesections in openstreetmapOverpass / Overpy: Getting Way IDs from NodesOverpass API - Multiple ways for same roadFetching node(nd) reference data of way in Overpass query resultRetrieving OpenStreetMap data (ways and its child nodes) by coordinates using Overpass API?
Derivation of CDF of a function that results in an exponential distribution
How would Japanese people react to someone refusing to say “itadakimasu” for religious reasons?
cannot access to my session
Build a scale without computer
Do details of my undergraduate title matter?
How to prevent cables getting intertwined
Having some issue with notation in a Hilbert space
Are there examples of rowers who also fought?
How did Frodo know where the Bree village was?
I have found ports on my Samsung smart tv running a display service. What can I do with it?
What does this Swiss black on yellow rectangular traffic sign with a symbol looking like a dart mean?
Is there a polite way to ask about one's ethnicity?
How to recover a single blank shot from a film camera
Basic power tool set for Home repair and simple projects
A medieval book with a redhead girl as a main character who allies with vampires and werewolves against scientific opposition
Why we can't jump without bending our knees?
What is "dot" sign in •NO?
How "fast" do astronomical events occur?
When is the phrase "j'ai bon" used?
How to make a villain when your PCs are villains?
Do battery electrons only move if there is a positive terminal at the end of the wire?
Should I email my professor to clear up a (possibly very irrelevant) awkward misunderstanding?
Fibonacci sequence and other metallic sequences emerged in the form of fractions
Co-worker is now managing my team. Does this mean that I'm being demoted?
Query nodes and attributes of parent ways
Overpass API: Get coordinates of postal boundaryCorrect order of nodes in Overpass queryHow can I get a relation with multiple ways as members in addition to the members with Overpass QL?Is there a Service to get only nodes from OSM?Query for WAY that connects two INTERSECTIONSA way to find all footway and street interesections in openstreetmapOverpass / Overpy: Getting Way IDs from NodesOverpass API - Multiple ways for same roadFetching node(nd) reference data of way in Overpass query resultRetrieving OpenStreetMap data (ways and its child nodes) by coordinates using Overpass API?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Does the Overpass API provide a way to query a list of nodes and some attributes of their parent ways, and return the data in CSV format?
For example, the following will give me all motorway junctions:
[out:csv(ref, name, ::lat, ::lon)];
// gather results
(
// query part for: “highway=milestone”
node["highway"="motorway_junction"](bbox);
);
// print results
out body;
>;
out skel qt;
Is there a way to query the ref=*
tag of the roads of which the node is a member?
openstreetmap overpass-api
add a comment |
Does the Overpass API provide a way to query a list of nodes and some attributes of their parent ways, and return the data in CSV format?
For example, the following will give me all motorway junctions:
[out:csv(ref, name, ::lat, ::lon)];
// gather results
(
// query part for: “highway=milestone”
node["highway"="motorway_junction"](bbox);
);
// print results
out body;
>;
out skel qt;
Is there a way to query the ref=*
tag of the roads of which the node is a member?
openstreetmap overpass-api
add a comment |
Does the Overpass API provide a way to query a list of nodes and some attributes of their parent ways, and return the data in CSV format?
For example, the following will give me all motorway junctions:
[out:csv(ref, name, ::lat, ::lon)];
// gather results
(
// query part for: “highway=milestone”
node["highway"="motorway_junction"](bbox);
);
// print results
out body;
>;
out skel qt;
Is there a way to query the ref=*
tag of the roads of which the node is a member?
openstreetmap overpass-api
Does the Overpass API provide a way to query a list of nodes and some attributes of their parent ways, and return the data in CSV format?
For example, the following will give me all motorway junctions:
[out:csv(ref, name, ::lat, ::lon)];
// gather results
(
// query part for: “highway=milestone”
node["highway"="motorway_junction"](bbox);
);
// print results
out body;
>;
out skel qt;
Is there a way to query the ref=*
tag of the roads of which the node is a member?
openstreetmap overpass-api
openstreetmap overpass-api
asked 8 hours ago
user149408user149408
18017
18017
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Yes, that's possible:
[out:csv(_ref, name, ::lat, ::lon)];
node["highway"="motorway_junction"](bbox);
foreach // iterate over nodes
way(bn)[highway~"^(motorway
Thanks! I’ve edited the answer to include also trunk roads. There are still issues to be solved where multiple ways with differentref
tags are involved: either different spellings (A8
vs.A 8
), or the road name actually changes at the junction (A2
becomingS8
). The solution to that probably depends on the use case: I would want two rows, one for each road, so it’s probably better to search for the roads and iterate over its junctions.
– user149408
7 hours ago
1
To have one single entry for each of the ".ways", you'd need to add another foreach loop and iterate over those ways.
– mmd
6 hours ago
So I’ve replaced theif
with anotherforeach
, and I get short of 200 results (which looks OK). Problem is, how can I refer to tags of the way from the innerforeach
?
– user149408
6 hours ago
1
Try this one: overpass-turbo.eu/s/JY8
– mmd
6 hours ago
That did the trick. Thanks again!
– user149408
5 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f325914%2fquery-nodes-and-attributes-of-parent-ways%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes, that's possible:
[out:csv(_ref, name, ::lat, ::lon)];
node["highway"="motorway_junction"](bbox);
foreach // iterate over nodes
way(bn)[highway~"^(motorway
Thanks! I’ve edited the answer to include also trunk roads. There are still issues to be solved where multiple ways with differentref
tags are involved: either different spellings (A8
vs.A 8
), or the road name actually changes at the junction (A2
becomingS8
). The solution to that probably depends on the use case: I would want two rows, one for each road, so it’s probably better to search for the roads and iterate over its junctions.
– user149408
7 hours ago
1
To have one single entry for each of the ".ways", you'd need to add another foreach loop and iterate over those ways.
– mmd
6 hours ago
So I’ve replaced theif
with anotherforeach
, and I get short of 200 results (which looks OK). Problem is, how can I refer to tags of the way from the innerforeach
?
– user149408
6 hours ago
1
Try this one: overpass-turbo.eu/s/JY8
– mmd
6 hours ago
That did the trick. Thanks again!
– user149408
5 hours ago
add a comment |
Yes, that's possible:
[out:csv(_ref, name, ::lat, ::lon)];
node["highway"="motorway_junction"](bbox);
foreach // iterate over nodes
way(bn)[highway~"^(motorway
Thanks! I’ve edited the answer to include also trunk roads. There are still issues to be solved where multiple ways with differentref
tags are involved: either different spellings (A8
vs.A 8
), or the road name actually changes at the junction (A2
becomingS8
). The solution to that probably depends on the use case: I would want two rows, one for each road, so it’s probably better to search for the roads and iterate over its junctions.
– user149408
7 hours ago
1
To have one single entry for each of the ".ways", you'd need to add another foreach loop and iterate over those ways.
– mmd
6 hours ago
So I’ve replaced theif
with anotherforeach
, and I get short of 200 results (which looks OK). Problem is, how can I refer to tags of the way from the innerforeach
?
– user149408
6 hours ago
1
Try this one: overpass-turbo.eu/s/JY8
– mmd
6 hours ago
That did the trick. Thanks again!
– user149408
5 hours ago
add a comment |
Yes, that's possible:
[out:csv(_ref, name, ::lat, ::lon)];
node["highway"="motorway_junction"](bbox);
foreach // iterate over nodes
way(bn)[highway~"^(motorway
Yes, that's possible:
[out:csv(_ref, name, ::lat, ::lon)];
node["highway"="motorway_junction"](bbox);
foreach // iterate over nodes
way(bn)[highway~"^(motorway
edited 6 hours ago
user149408
18017
18017
answered 8 hours ago
mmdmmd
2,3651616
2,3651616
Thanks! I’ve edited the answer to include also trunk roads. There are still issues to be solved where multiple ways with differentref
tags are involved: either different spellings (A8
vs.A 8
), or the road name actually changes at the junction (A2
becomingS8
). The solution to that probably depends on the use case: I would want two rows, one for each road, so it’s probably better to search for the roads and iterate over its junctions.
– user149408
7 hours ago
1
To have one single entry for each of the ".ways", you'd need to add another foreach loop and iterate over those ways.
– mmd
6 hours ago
So I’ve replaced theif
with anotherforeach
, and I get short of 200 results (which looks OK). Problem is, how can I refer to tags of the way from the innerforeach
?
– user149408
6 hours ago
1
Try this one: overpass-turbo.eu/s/JY8
– mmd
6 hours ago
That did the trick. Thanks again!
– user149408
5 hours ago
add a comment |
Thanks! I’ve edited the answer to include also trunk roads. There are still issues to be solved where multiple ways with differentref
tags are involved: either different spellings (A8
vs.A 8
), or the road name actually changes at the junction (A2
becomingS8
). The solution to that probably depends on the use case: I would want two rows, one for each road, so it’s probably better to search for the roads and iterate over its junctions.
– user149408
7 hours ago
1
To have one single entry for each of the ".ways", you'd need to add another foreach loop and iterate over those ways.
– mmd
6 hours ago
So I’ve replaced theif
with anotherforeach
, and I get short of 200 results (which looks OK). Problem is, how can I refer to tags of the way from the innerforeach
?
– user149408
6 hours ago
1
Try this one: overpass-turbo.eu/s/JY8
– mmd
6 hours ago
That did the trick. Thanks again!
– user149408
5 hours ago
Thanks! I’ve edited the answer to include also trunk roads. There are still issues to be solved where multiple ways with different
ref
tags are involved: either different spellings (A8
vs. A 8
), or the road name actually changes at the junction (A2
becoming S8
). The solution to that probably depends on the use case: I would want two rows, one for each road, so it’s probably better to search for the roads and iterate over its junctions.– user149408
7 hours ago
Thanks! I’ve edited the answer to include also trunk roads. There are still issues to be solved where multiple ways with different
ref
tags are involved: either different spellings (A8
vs. A 8
), or the road name actually changes at the junction (A2
becoming S8
). The solution to that probably depends on the use case: I would want two rows, one for each road, so it’s probably better to search for the roads and iterate over its junctions.– user149408
7 hours ago
1
1
To have one single entry for each of the ".ways", you'd need to add another foreach loop and iterate over those ways.
– mmd
6 hours ago
To have one single entry for each of the ".ways", you'd need to add another foreach loop and iterate over those ways.
– mmd
6 hours ago
So I’ve replaced the
if
with another foreach
, and I get short of 200 results (which looks OK). Problem is, how can I refer to tags of the way from the inner foreach
?– user149408
6 hours ago
So I’ve replaced the
if
with another foreach
, and I get short of 200 results (which looks OK). Problem is, how can I refer to tags of the way from the inner foreach
?– user149408
6 hours ago
1
1
Try this one: overpass-turbo.eu/s/JY8
– mmd
6 hours ago
Try this one: overpass-turbo.eu/s/JY8
– mmd
6 hours ago
That did the trick. Thanks again!
– user149408
5 hours ago
That did the trick. Thanks again!
– user149408
5 hours ago
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f325914%2fquery-nodes-and-attributes-of-parent-ways%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown