"direction" vs traffic_sign:direction" on traffic_sign

Hello,
I’ve seen the “direction” tag being discouraged for traffic_sign nodes here : Key:direction

However, it’s still recommended on various traffic sign wikis, such as this one : Tag:traffic_sign=city_limit

Also the explaination of why we decided not to use the “direction” tag is rather unconvincing :

It is unknown why the key direction=*, which was also already in use and has the same meaning as traffic_sign:direction=*, wasn’t used instead.

So, has this tagging scheme really been approved? It’s not mentioned in my country’s wiki

This has come up aswell in Germany and was part of some confusion.

Still the corresponding paragraph makes sense:

Do not use the simple direction tag for highway=traffic_signals and traffic_sign=* that are part of a way,

So when you put a node with a “traffic_sign” into a way you make it machine readable in which direction (Of the way) the traffic_sign has its legal direction. So a bearing does not make sense.

IMHO putting traffic_sign= nodes into a way is a semantic bullshit anyway but thats another topic.

So - I map traffic_signs at the position they exactly are next to the street, and i add a direction with a bearing from which direction they are visible. (And i try to add/tag a mapillary photo)

Given we have a stop or yield sign i additionally tag a node in the road with “highway=stop” or “highway=give_way” with an direction=forward/backward. Thats not a traffic_sign but the legal position the traffic sign i mapped next to the road applies at.

Flo

This was added by @emvee in 2020: Key:direction: Difference between revisions - OpenStreetMap Wiki

Do not use the direction tag for {{tag|highway||traffic_signals}} that are part of a way, instead use {{tag|traffic_signals:direction||forward/backward}}.

and 2022: Key:direction: Difference between revisions - OpenStreetMap Wiki

For {{Key|traffic_sign}} there is {{Key|traffic_sign:direction||forward/backward}} but unlike for traffic signals also this tag, {{Key|direction}} is still used quite often.

And the final phrasing came in Key:direction: Difference between revisions - OpenStreetMap Wiki by wiki user “Hb”, I don’t know if they are on on the forum:

Do not use the simple direction tag for {{Tag|highway|traffic_signals}} and {{Key|traffic_sign}} that are part of a way, instead use {{Key|traffic_signals:direction||forward/backward}} and {{Key|traffic_sign:direction||forward/backward}}. Unfortunately a lot of road-bound traffic signs have still the key direction still set.

It doesn’t seem to correspond with actual tagging practice (direction is almost 5 times more common on traffic_sign objects than traffic_sign:direction is) and I would feel free to ignore it

2 Likes

~40% traffic_sign= are with highway= , therefore direction= would be used with =stop and =give_way

2 Likes

The thing is traffic_sign:direction is used by default by the ID editor when mapping a traffic_sign, so most contributors will use it anyway
Edit : when adding a traffic_sign on a way*

1 Like

Except only 60k of highway=stop have a traffic_sign tag and 87k of highway=give_way, meanwhile there are 480k traffic_sign objects with direction - so 70% of traffic_sign with direction does not have a highway=stop nor highway=give_way

Why a dedicated :direction sub-key for each feature rather than the generic direction tag? traffic_signals:direction, traffic_sign:direction — what’s next?

legally, at least in Germany, road markings are also traffic signs. AFAIR there aren’t yield markings in Germany, but stop lines are compulsory

1 Like

Note the differentiation between traffic_sign details mapped as a property of a highway=stop vs a traffic_sign mapped as a standalone feature.

The approach I use is:

  1. Map traffic signs where they are in reality, as an unattached node.
    Example, a south-facing stop sign on a post:
    traffic_sign=US:R1-1+traffic_sign:direction=180+traffic_sign:support=post
preset details

(from my seattle_stops_and_signs.xml JOSM preset)

    <item name="01. Traffic Sign" type="node">
      <label text="Traffic Sign" />
      <combo key="traffic_sign:direction" text="Traffic Sign Direction (0-359)" values="0,90,180,270,N,S,E,W" default="" />
      <combo key="traffic_sign" text="Traffic Sign Type" values="US:R1-1,US:R1-2,US:R2-1,US:R5-1,US:R8-3,US:OM1-3,US:W14-1" display_values="Stop,Yield,Speed Limit,Do Not Enter,No Parking,Yellow Diamond,Dead End" default="US:R1-1" />
      <combo key="traffic_sign:support" text="Traffic Sign Support" values="post,pole,gantry,wire,tree,wall" display_values="Post,Pole,Gantry,Wire,Tree,Wall" default="post" />
      <text key="ref:US-WA:SDOT" text="SDOT Unit ID" default="" />
      <combo key="operator" text="Operator" values="Seattle Department of Transportation" default="Seattle Department of Transportation" />
      <combo key="operator:wikidata" text="Operator (Wikidata)" values="Q39052410" default="Q39052410" />
      <combo key="operator:short" text="Operator (Short)" values="SDOT" default="SDOT" />
    </item>
  1. Map the implication of the traffic sign as a node on the corresponding highway way
    Example, implication of that south-facing stop sign:
    highway=stop+direction=forward+traffic_sign=separate[1]
preset details

(from my seattle_stops_and_signs.xml JOSM preset)

    <item name="03. Implication" type="node">
      <label text="Implication" />
      <combo key="highway" text="Implication Type" values="stop,give_way" display_values="Stop,Yield" default="stop" />
      <combo key="direction" text="Direction" values="forward,backward" display_values="Forward,Backward" default="" />
      <combo key="traffic_sign" text="Traffic Sign" values="separate" display_values="Mapped Separately" default="separate" />
    </item>

This way, all of the little details about the traffic sign itself are offloaded to the separately mapped node, and the functional routing-relevant implications of that sign (that drivers have to stop there) are what’s tagged on the node that’s part of the highway.


If the sign is already being mapped as a free-floating node, where direction refers to the direction to which the sign itself is pointing, then why prefix with the feature type?

Well, when multiple features are mapped on the same element, namespacing the details in a <feature>:<attribute>=<value> model is the only way to disambiguate which attribute value belongs to which feature.

Say there’s a utility pole with a streetlight, a surveillance camera, and a stop sign: you’d need to specify light:direction=*+camera:direction=*+traffic_sign:direction=*.

That’s not necessarily ideal, but the other options (stacked nodes or relations) seem worse to me, so I just add the redundant feature prefix to bypass the issue[2].

Maybe I should add highway=stop_sign to my preset as the “feature-identifying tag” for separately mapped traffic signs?


  1. (meaning "a traffic sign for this implication exists, and is mapped separately) ↩︎

  2. (while perpetuating another one, yes - so I’m happy to hear others’ ideas on better approaches!) ↩︎

2 Likes

We shouldn’t map different things on the same object just because they are on the same position. Either map them on distinct nodes or use a relation (provides feature or node rel).

That does not scale in typical situations - Typically those poles carry more than one traffic sign with different directions. I split them off into separate nodes.

Flo

That is not the case for highway=traffic_signals, only a marginal 1% is using direction instead of traffic_signals:direction and that is what I first changed in the Wiki.

My second change on traffic_sign clearly indicates that direction is quite popular.

What you write for traffic_sign (almost 5 times more common) is not that clear, direction can also be cardinal and maybe quite some traffic_sign are part of a road also impacting the statistics. Yes, for traffic_sign, I think there is currently more direction than traffic_sign:direction but it could be only a factor 2, I would love to see how this did evolve over time.