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;








1















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?










share|improve this question




























    1















    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?










    share|improve this question
























      1












      1








      1








      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?










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 8 hours ago









      user149408user149408

      18017




      18017




















          1 Answer
          1






          active

          oldest

          votes


















          2














          Yes, that's possible:



          [out:csv(_ref, name, ::lat, ::lon)];
          node["highway"="motorway_junction"](bbox);

          foreach // iterate over nodes

          way(bn)[highway~"^(motorway





          share|improve this answer

























          • 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





            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






          • 1





            Try this one: overpass-turbo.eu/s/JY8

            – mmd
            6 hours ago











          • That did the trick. Thanks again!

            – user149408
            5 hours ago











          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
          );



          );













          draft saved

          draft discarded


















          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









          2














          Yes, that's possible:



          [out:csv(_ref, name, ::lat, ::lon)];
          node["highway"="motorway_junction"](bbox);

          foreach // iterate over nodes

          way(bn)[highway~"^(motorway





          share|improve this answer

























          • 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





            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






          • 1





            Try this one: overpass-turbo.eu/s/JY8

            – mmd
            6 hours ago











          • That did the trick. Thanks again!

            – user149408
            5 hours ago















          2














          Yes, that's possible:



          [out:csv(_ref, name, ::lat, ::lon)];
          node["highway"="motorway_junction"](bbox);

          foreach // iterate over nodes

          way(bn)[highway~"^(motorway





          share|improve this answer

























          • 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





            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






          • 1





            Try this one: overpass-turbo.eu/s/JY8

            – mmd
            6 hours ago











          • That did the trick. Thanks again!

            – user149408
            5 hours ago













          2












          2








          2







          Yes, that's possible:



          [out:csv(_ref, name, ::lat, ::lon)];
          node["highway"="motorway_junction"](bbox);

          foreach // iterate over nodes

          way(bn)[highway~"^(motorway





          share|improve this answer















          Yes, that's possible:



          [out:csv(_ref, name, ::lat, ::lon)];
          node["highway"="motorway_junction"](bbox);

          foreach // iterate over nodes

          way(bn)[highway~"^(motorway






          share|improve this answer














          share|improve this answer



          share|improve this answer








          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 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





            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






          • 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







          • 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 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





            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

















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單