Hi,

I have coordinates where there should be some nodes. Is there a way to get a node id with (lat,long). If that is not possible how to get nodes around some coordinate? I need nodes related to traffic (traffic lights etc.)

This question is marked "community wiki".

asked 03 Oct '20, 19:13

Mico95's gravatar image

Mico95
11123
accept rate: 0%

edited 03 Oct '20, 19:14


You could try using the overpass-turbo service. In this example

[out:csv(::lat, ::lon)][timeout:25];
// fetch area “Bergamo” to search in
area[name="Bergamo"][admin_level="8"]->.searchArea;
// gather results
(
  // query part for: “highway=traffic_light”
  node["highway"="traffic_signals"](area.searchArea);
);
// print results
out;

Finds all the traffic lights in Bergamo and gives an CSV like output containing lat,lon coordinates of the nodes. You could add some more info to the out:csv part (for example ::id, name, see Wiki for more examples). You have to just edit the area info. You could also use a bounding box with coordinates

permanent link

answered 04 Oct '20, 10:09

Mannivu's gravatar image

Mannivu
1.1k727
accept rate: 6%

edited 04 Oct '20, 10:10

Your answer
toggle preview

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:

×180
×56

question asked: 03 Oct '20, 19:13

question was seen: 244 times

last updated: 04 Oct '20, 10:10

powered by OSQA