This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Can I filter to view only street lights?

1
1

When using https://www.openstreetmap.org/ when I zoom in on a city I can see street lights on a junction. However they are not clearly visible due to their small size and the numerous other small symbols.

I would like to view every traffic light in a city to compare with this post which displays every traffic light in a Dutch city.

Is there a way of filtering the key to only display traffic lights, and when zoomed out?

asked 12 Mar '14, 14:24

WheelsOnTheBike's gravatar image

WheelsOnTheBike
31112
accept rate: 0%

you write "street lights" in the title. But you are not referring to lighting, right? Maybe change this to "traffic light / signals" then.

(12 Mar '14, 15:56) aseerel4c26 ♦

One Answer:

4

Yes, this is possible. For example by using the Overpass API or overpass turbo.

Here is an example using overpass turbo:

<osm-script output="json">
  <union>
    <query type="node">
      <has-kv k="highway" v="traffic_signals"/>
      <bbox-query {{nominatimBbox:Dresden}}/>
    </query>
  </union>
  <print mode="body"/>
  <recurse type="down"/>
  <print mode="skeleton"/>
</osm-script>

It will display all traffic signal for the city Dresden. If you choose to use the Overpass API instead, you will have to replace the {{nominatimBbox:Dresden}} keyword with the bounding box of the corresponding city, because nominatimBbox is an extension specific for overpass turbo.

answered 12 Mar '14, 15:19

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

2

Perfect, thank you.

(12 Mar '14, 15:56) WheelsOnTheBike

Source code available on GitHub .