You are not logged in.

#1 2019-03-12 09:32:02

Mnfy43
Member
Registered: 2018-01-05
Posts: 12

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.

Offline

#2 2019-03-21 22:56:36

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,784
Website

Re: Conditional Direction

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.)


OSM in 3D: OSM2World

Offline

#3 2019-03-23 07:43:18

Mnfy43
Member
Registered: 2018-01-05
Posts: 12

Re: Conditional Direction

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:
oneway:alternating
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

Last edited by Mnfy43 (2019-03-23 07:46:06)

Offline

#4 2019-03-23 11:23:21

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,784
Website

Re: Conditional Direction

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.


OSM in 3D: OSM2World

Offline

#5 2019-03-23 15:26:19

Mnfy43
Member
Registered: 2018-01-05
Posts: 12

Re: Conditional Direction

Tordanik wrote:

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

Offline

#6 2019-03-25 09:28:42

TZorn
Member
From: Leverkusen
Registered: 2015-06-02
Posts: 700

Re: Conditional Direction

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

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

Offline

#7 2019-03-25 18:05:10

Jakka
Member
Registered: 2014-10-17
Posts: 81

Re: Conditional Direction

TZorn wrote:

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=reversible
oneway:conditional=yes @ (12:00-04:00);-1 @ (04:00-12:00)

Offline

#8 2019-03-25 18:22:23

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,784
Website

Re: Conditional Direction

Jakka wrote:

Question: in this example how do you know witch direction is from 12:00 to 04:00
oneway=reversible
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: https://wiki.openstreetmap.org/wiki/For … n_of_a_way


OSM in 3D: OSM2World

Offline

#9 2019-03-26 07:47:54

Mnfy43
Member
Registered: 2018-01-05
Posts: 12

Re: Conditional Direction

TZorn wrote:

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

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

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.

Last edited by Mnfy43 (2019-03-26 07:54:26)

Offline

#10 2019-03-26 10:46:28

TZorn
Member
From: Leverkusen
Registered: 2015-06-02
Posts: 700

Re: Conditional Direction

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 Maps.me totally ignores the oneway tagging, Google Maps did the switch at noon as expected.

Last edited by TZorn (2019-03-26 12:25:05)

Offline

#11 2019-03-26 19:51:23

Mnfy43
Member
Registered: 2018-01-05
Posts: 12

Re: Conditional Direction

TZorn wrote:

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 Maps.me 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.

Last edited by Mnfy43 (2019-03-26 23:56:56)

Offline

Board footer

Powered by FluxBB