0

I am new to all this stuff.

I currently want to get all the traffic signs in an area. I am running this query in overpass turbo, but nothing is returning back to me.

/*
This is an example Overpass query.
Try it out by pressing the Run button above!
You can find more examples with the Load tool.
*/
node
  [traffic_signs='*']
  ({{bbox}});
out;

1 Answer 1

0

Not sure where you got that query from. I usually either go to http://overpass-turbo.eu/ and put something in the wizard ("traffic sign" works well here) or go to the openstreetmap wiki, look for the thing I am after ("traffic sign") and that gets me here https://wiki.openstreetmap.org/wiki/Key:traffic_sign and there's a link to overpass-turbo.eu that is this:

/*
This query looks for nodes, ways and relations 
with the given key.
Choose your region and hit the Run button above!
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “traffic_sign=*”
  node["traffic_sign"]({{bbox}});
  way["traffic_sign"]({{bbox}});
  relation["traffic_sign"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

This seems to show no traffic signs in my town, although there's some in neighbouring towns so I'm sure its working. Perhaps traffic signs are badly mapped in my town.

Overpass query syntax is a bit of a mystery to me, so I'm not sure what's wrong with yours (except you have plural "traffic_signs") but even with "traffic_sign" I too get no matches. I'm not sure I understand that form of the search query - I usually get the wizards to work for me!

I think your query might be looking for a traffic sign with a name that is literally "*" - I don't see anything in the docs that says "*" is special. But a query with no "=" sign matches all:

["key"]  /* filter objects tagged with this key and any value */

From https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide

4
  • I just found out about the wizard lol, the thing that confuses me is that when I use the direct openstreetmap API call, it gives me a ton of data within my bbox and some of it has traffic signs, but when I go to the location in overpass, the signs do not show. Is this because even if users uploaded a photo of traffic signs they still need to be mapped onto the location or approved? Jul 16, 2020 at 21:57
  • if you get a thing from the API and it has that tag so that the Overpass query should find it but doesn't, then something isn't right. Check its tags closely and post an example?
    – Spacedman
    Jul 16, 2020 at 22:11
  • thanks for coming back: I made another post about my issue with more detail in it gis.stackexchange.com/questions/367976/… Jul 16, 2020 at 23:00
  • ='*' matches an exact key value asterix, it's not treated as a regular expression because of the "=" equals sign. Regular expression evaluation needs a ~ (tilde) sign instead.
    – mmd
    Jul 17, 2020 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.