Turn restrictions: Correct length of from/to paths

Consider the following example:


Lets say coming from A-street traffic is only allowed to turn right onto B-street (but not go straight on). So there will be a only_right_turn turn restriction at that corner.

Main Question:
What are the correct to/from relation members for this turn restriction?

Option 1:
from = only section a of A-Street
to = only section b of B-Street

  • If there are many turn restrictions along a street, it will be chopped up into many small fragments, that all duplicate the same information. E.g. adding a speed limit later on requires to set it for all fragments of the street.
  • If a new side street with a junction is added (see c), most of the time nobody will bother and split and shorten the member paths of the turn restriction. Especially, if only a footway/pedestrian crossing is added.

Option 2:
from = entire length of A-Street
to = entire length of B-Street
Cons: The legs of the restriction might cross multiple other junctions.
I keep finding this option a lot in the wild. It is often the result of adding side streets (to A/B-street) later on. Routing algorithms must apply the restriction already when a driver uses at least the last/first part of the from/to relation member. (Contrary to the full legths of the from and topaths)

Examples in the wiki only show option 1, but don’t explicitly forbid option 2.
Is option 2 viable, or is the effort to keep restrictions always as short as possible justified?

If you use a role=via node there is no choice. Both the from and to way have to end at the shared node which gets the via role.
I don’t see a good reason for option 2

I changed the picture to make it more clear. A-street and B-street end at that corner.

It doesn’t matter where the real life roads end. A type=restriction relation with a role=via node needs two OSM ways which start/end at that via node.

They both end at the via node. My question is how long they are supposed to extend from there on.

That doesn’t matter at all for the restriction.
Edit: Not sure but I think you misunderstand how a road is mapped in OSM. A road A-Street can be a single OSM way or 2 or 100 ways which are connected. There are various reasons to use more than one OSM way. Turn restrictions are one reason, differences in surface, speed limit, lanes, sidewalks etc are others.

Yes, I know that there are good reasons why ways get split. I wanted to know, if turn restrictions are one of them. So you are saying no, (option 2 is fine) for this case. Obviously there are other cases (e.g. via node in the middle), where splitting is unavoidable.

Yes, a turn restriction is one possible reason to split a way. A new junction node for c is no reason unless additional turn restrictions are needed there.