2

How do I ask overpass turbo to give me the way tags corresponding to a set of latitude longitude coordinates?

thanks!

This is what i tried so far:

[out:json][timeout:25];
(way(around:1.0,52.004940, 4.369381));
(._;>;);
out tags;

But there are 2 problems here. 1. I get a list of different nodes and ways. But i actually only want the way where there is a speed limit given 2. I don't know how to write a query for a whole list of coordinates. Not sure if this is even possible.

mastersom
  • 525
  • 1
  • 9
  • 25
  • @mmd please see my edited question. – mastersom Dec 06 '16 at 12:23
  • 1
    1. you need to use a tag filer: [maxspeed] and add that to your way query: `way(around:1.0,52.004940, 4.369381)[maxspeed]`. 2. no, that's no possible - you need several way(around:...) queries and get the union of all queries. Better would be to use a larger radius and issue fewer queries. – mmd Dec 06 '16 at 12:37
  • it still gives me the nodes. But it did filter out the ways without maxspeed tag. So I guess i need to somehow filter out the "type" = "node". Any suggestions? – mastersom Dec 06 '16 at 13:02
  • Remove that `(._;>;);` part. – mmd Dec 06 '16 at 13:05
  • Works! Thanks mmd! – mastersom Dec 06 '16 at 13:28

1 Answers1

4

Here's how the query should look like to return ways with maxspeed tags at a given location with 1m radius:

way[maxspeed](around:1.0,52.004940, 4.369381);
out tags;
mmd
  • 3,423
  • 1
  • 16
  • 23