NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi

I'm brand new to OpenStreetMap. Please kindly understand if this question has been asked before.

I'm trying to write a query in Overpass Turbo (open to other data mining tool) so that it generates every name of cross streets that a node is part of.

For example of Node 42449597 the output will be : Warren Street, Church Street, Church Street, and Warren Street

Eventually this query is intended to go after another one that will see select a few number of interested Nodes.

Hope this is clear. Many thanks, in advance!

asked 07 Jan '21, 04:45

traffic8's gravatar image

traffic8
21112
accept rate: 0%


Hi, you don't need to use Overpass for this. Returning all the tags of all the ways that use a given node ID is a single command from the standard OSM api:

>curl https://www.openstreetmap.org/api/0.6/node/42449597/ways

<osm version="0.6" generator="CGImap 0.8.3 (615120 spike-06.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
 <way id="222299254" visible="true" version="11" changeset="96751287" timestamp="2020-12-31T21:07:57Z" user="kguenther24" uid="11697944">
  <nd ref="42429562"/>
  <nd ref="8279851483"/>
  <nd ref="5135853006"/>
  <nd ref="8279851437"/>
  <nd ref="42449597"/>
  <tag k="construction" v="minor"/>
  <tag k="cycleway:right" v="shared_lane"/>
  <tag k="hgv" v="local"/>
  <tag k="highway" v="secondary"/>
  <tag k="maxspeed" v="25 mph"/>
  <tag k="name" v="Church Street"/>
  <tag k="oneway" v="yes"/>
  <tag k="tiger:cfcc" v="A41"/>
  <tag k="tiger:county" v="New York, NY"/>
  <tag k="tiger:name_base" v="Church"/>
  <tag k="tiger:name_type" v="St"/>
  <tag k="tiger:reviewed" v="no"/>
  <tag k="tiger:zip_left" v="10013"/>
  <tag k="tiger:zip_right" v="10013"/>
 </way>
 <way id="413050335" visible="true" version="13" changeset="96751287" timestamp="2020-12-31T21:07:57Z" user="kguenther24" uid="11697944">
  <nd ref="4143812552"/>
  <nd ref="5812723033"/>
  <nd ref="7536025166"/>
  <nd ref="7410938048"/>
  <nd ref="42449600"/>
  <nd ref="7410938045"/>
  <nd ref="8279851438"/>
  <nd ref="42449597"/>
  <tag k="bicycle" v="yes"/>
  <tag k="construction" v="minor"/>
  <tag k="cycleway:left" v="lane"/>
  <tag k="highway" v="residential"/>
  <tag k="maxspeed" v="25 mph"/>
  <tag k="name" v="Warren Street"/>
  <tag k="oneway" v="yes"/>
  <tag k="surface" v="asphalt"/>
  <tag k="tiger:cfcc" v="A41"/>
  <tag k="tiger:county" v="New York, NY"/>
  <tag k="tiger:name_base" v="Warren"/>
  <tag k="tiger:name_type" v="St"/>
  <tag k="tiger:reviewed" v="no"/>
 </way>
 <way id="483707770" visible="true" version="5" changeset="96751287" timestamp="2020-12-31T21:07:57Z" user="kguenther24" uid="11697944">
  <nd ref="42449597"/>
  <nd ref="8279851436"/>
  <nd ref="7439027751"/>
  <nd ref="42431611"/>
  <tag k="construction" v="minor"/>
  <tag k="cycleway:right" v="lane"/>
  <tag k="hgv" v="local"/>
  <tag k="highway" v="secondary"/>
  <tag k="maxspeed" v="25 mph"/>
  <tag k="name" v="Church Street"/>
  <tag k="oneway" v="yes"/>
  <tag k="surface" v="asphalt"/>
  <tag k="tiger:cfcc" v="A41"/>
  <tag k="tiger:county" v="New York, NY"/>
  <tag k="tiger:name_base" v="Church"/>
  <tag k="tiger:name_type" v="St"/>
  <tag k="tiger:reviewed" v="no"/>
  <tag k="tiger:zip_left" v="10013"/>
  <tag k="tiger:zip_right" v="10013"/>
 </way>
 <way id="588168462" visible="true" version="4" changeset="96751287" timestamp="2020-12-31T21:07:57Z" user="kguenther24" uid="11697944">
  <nd ref="42449597"/>
  <nd ref="8279851435"/>
  <nd ref="8262309631"/>
  <nd ref="2821304136"/>
  <tag k="bicycle" v="yes"/>
  <tag k="construction" v="minor"/>
  <tag k="cycleway:left" v="lane"/>
  <tag k="highway" v="residential"/>
  <tag k="maxspeed" v="25 mph"/>
  <tag k="name" v="Warren Street"/>
  <tag k="oneway" v="yes"/>
  <tag k="surface" v="asphalt"/>
  <tag k="tiger:cfcc" v="A41"/>
  <tag k="tiger:county" v="New York, NY"/>
  <tag k="tiger:name_base" v="Warren"/>
  <tag k="tiger:name_type" v="St"/>
  <tag k="tiger:reviewed" v="no"/>
 </way>
</osm>
permanent link

answered 07 Jan '21, 16:57

jmapb's gravatar image

jmapb
3.4k73361
accept rate: 22%

edited 07 Jan '21, 16:58

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×228
×205
×167

question asked: 07 Jan '21, 04:45

question was seen: 1,546 times

last updated: 07 Jan '21, 16:58

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum