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

I'm interested in displaying the name of road/street that certain features sit on. One feature I'm interested in is 'crossing' another is traffic_signal. I've come up with some Overpass QL (below), but is this a sensible approach, or is there a more efficient method? The bbox I'm interested in is Norwich, UK [bbox:52.578228,1.171761,52.693864,1.525726].
Thanks, Robin

node["highway"="crossing"];
    foreach {
      way(bn)["name"]-> .ways;
      convert result
          ::id   = id(),
          ::geom = center(geom()),
          road_name    = ways.set(t["name"] ),
          road_speed = ways.set(t["maxspeed"]),
          :: = ::;
    out geom;
    }

 (node["highway"="traffic_signals"];);
    foreach {
      way(bn)["name"]-> .ways;
      convert result
          ::id   = id(),
          ::geom = center(geom()),
          road_name    = ways.set(t["name"] ),
          road_speed = ways.set(t["maxspeed"]),
          ::     = ::;
    out geom;
    }

asked 19 Jul '19, 12:22

RobinK's gravatar image

RobinK
11113
accept rate: 0%

edited 19 Jul '19, 23:46

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:

×483
×65

question asked: 19 Jul '19, 12:22

question was seen: 1,191 times

last updated: 19 Jul '19, 23:46

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