Conditional Direction

Hi. In the city i’m living in, there is a one-way road whose motorized traffic direction is time dependent. For more detailed description, i should say, its direction is from east to west from 8:00 AM to 10:00 AM on non-holidays and at other hours of the day and also on holidays, its motorized traffic direction is from west to east. I don’t know how represent this situation in the tagging system. Of course i should say that i have already surveyed the Conditional Restrictions article in the Wiki, but unfortunately i couldn’t find any suitable tagging scheme for this situation in the article. Any suggestions are appreciated.

I think Conditional Restrictions are what you’re looking for. I’d draw the road west to east and tag it as:

oneway = yes
oneway:conditional = -1 @ (Mo-Fr 08:00-10:00; PH off)

(I’m not sure about the “Mo-Fr”: I assumed work days only but may have misinterpreted your description of the situation. The “PH off” also assumes that the oneway isn’t reversed on public holidays.)

Thank you for the reply. I don’t think your suggestion works properly because as i know, Values “1” or “-1” are not predefined values for the conditional restriction tag: oneway:conditional=* but Predefined values for the tag only may be “yes” or “no” plus @ preceding condition. Maybe some proposal should be made in this case. For example something like this in simple form:
direction:conditional=<1|-1> @ condition in which “1” represents direction of way drawing and “-1” represents opposite direction of way drawing. Thanks once again for your attention

The part of the value before the @ character is not defined by conditional restrictions. It’s simply taken from the possible values of the base key. In this case, the base key is oneway, so all documented values of oneway, including -1 (which is documented here), may appear there.

I got it(by your help). The issue is solved. Thank you so much

There is also the value oneway=reversible for such cases.

Have a look at this example for how it can be used.

Question: in this example how do you know witch direction is from 12:00 to 04:00
oneway:conditional=yes @ (12:00-04:00);-1 @ (04:00-12:00)

The value of oneway:conditional has two parts in that example, which are separated by a semicolon:

yes @ (12:00-04:00)
-1 @ (04:00-12:00)

So oneway has the value “yes” between 12:00 and 04:00, and the value “-1” the rest of the time. The value “yes” means “this road is a oneway road in the direction of the OSM way”, whereas “-1” means “this road is a oneway road opposite to the direction of the OSM way”.

For how to see the direction of an OSM way, have a look at this wiki page:,left%26_right#Identifying_the_direction_of_a_way

Thanks for your reply. I referred to the link named “this example” which you posed and considered the tagging scheme in iD editor and also tried routing in both directions on part of Herbert-Weichmann Street in OSM map interface itself using both OSRM and GraphHopper routing engines. The result is being strange to me. It doesn’t make any difference to the routing engines, anyhow and at anytime OSRM bypasses Herbert-Weichmann Street and GraphHopper gives routes on the street itself in both directions! It seems that the scheme does’t work as expected.

Well, it’s not guaranteed that all routing engines adhere to the scheme. I confirm your observations. OSRM seems to have excluded the street completely from its routing graph and GraphHopper completely ignores the oneway tags. But this is something the routing developers have to fix, the underlying scheme correctly describes the situation on the ground.

I just now (10:40) tested Magic Earth and - as it should - it only allowed the southbound direction (-1 @ (04:00-12:00)). I’ll test again after lunch and see if it will reverse the routing then.

edit after noon:

Magic Earth is now routing the other way round. So I can confirm that this routing engine takes the tagging of Herbert-Weichmann-Straße fully into account.

For what it’s worth: like Graphhopper totally ignores the oneway tagging, Google Maps did the switch at noon as expected.

I appreciate the time you spent in the case. I also tried it on “Magic Earth” App and reached the same result as you did.