Modify

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#11500 closed enhancement (invalid)

Inconsistent validator result: oneway=yes together with '*:lanes:forward'

Reported by: mdk Owned by: team
Priority: normal Milestone:
Component: Core validator Version: latest
Keywords: Cc:

Description (last modified by mdk)

Way 218075854 contains the following tags:

oneway=yes
bus:lanes:forward=designated|yes
turn:lanes:forward=|merge_to_left

But the valitaor only warns about the 'forward' in the 'bus:lanes:forward' key, but no warning for 'turn:lanes:forward'.
I always tag '*:lanes:forward' on oneway=yes, because if later somebody will remove the oneway tag or set it to oneway=no, the lane definition will not change implicit for the opposit direction.

And what about a oneway street whith a bus lane in the reverse direction (see way 28682845)? (Not quite correct, because the bus lane is in reality oneway=reversable, with special traffic lights for the busses at both ends. OT: any idea how to tag this ;-) )

Could we remove this warning? Or handle all '*:lanes:forward' together with 'oneway=yes' the same way, even if that is not what I hope will happend!

Attachments (0)

Change History (20)

comment:1 by mdk, 9 years ago

Description: modified (diff)

comment:2 by Klumbumbus, 9 years ago

contrary ticket to #9389

comment:3 by naoliv, 9 years ago

If somebody remove oneway=yes or change it to oneway=no then the lanes will be wrong (they will need to be updated).
This, for me, should be only bus:lanes (maybe use busway?) and turn:lanes.

in reply to:  3 ; comment:4 by mdk, 9 years ago

Replying to naoliv:

If somebody remove oneway=yes or change it to oneway=no then the lanes will be wrong (they will need to be updated).
This, for me, should be only bus:lanes (maybe use busway?) and turn:lanes.

As far as I can remember I never found a highway where I could use turn:lanes=*, because (at least in switzerland) normal highways have 2 lanes (one forward and one backward). On junctions the street is normally wided to 3 lanes:

lanes:forward=2                                        lanes:forward=1
lanes:backward=1                   (junction node)     lanes:backward=2
turn:lanes:forward=left|through                        turn:lanes:backward=left|through

Also bus:lanes are mostly only in one direction. But when removing oneway=yes from a way with bus:lanes=*, suddently an implicit bus:lanes:backward=* is added.
I don't understand what you mean with "then the lanes will be wrong"?

comment:5 by naoliv, 9 years ago

turn:lanes is valid for oneway=yes.
If you are mapping oneway=no or highways without oneway, then you need to specify turn:lanes:forward and/or turn:lanes:backward

Using turn:lanes:forward with oneway=yes is wrong (and this is what the validator is saying).

comment:6 by naoliv, 9 years ago

For your example, you should just replace turn:lanes:forward with turn:lanes (likewise bus:lanes:forward with bus:lanes)

comment:7 by naoliv, 9 years ago

You also need to specify lanes=X :-)

comment:8 by mdk, 9 years ago

Replying to naoliv:

Using turn:lanes:forward with oneway=yes is wrong (and this is what the validator is saying).

It's enough to tag turn:lanes, but why it is wrong to use turn:lanes:forward?

comment:9 by naoliv, 9 years ago

Not wrong, but somehow contradictory (or redundant).
If we are using turn:lanes:forward or turn:lanes:backward it implies that we have different lane configurations in each direction (but we have only one direction here).

It's as incorrect as using lanes:forward=2 + lanes:backward=0 with a oneway=yes highway.

comment:10 by mdk, 9 years ago

Ok, it's not wrong, as you said in comment 5, but redundent (or better over specified).
But then

lanes:forward=2
lanes:backward=1
lanes=3

as you suggest is redundent too.
According to the "Lane and road attribute" mappaint style, the example from comment 4 could be stripped to

turn:lanes:forward=left|through        (junction node)                turn:lanes:backward=left|through

without problems. All the lanes could be derived.

comment:11 by naoliv, 9 years ago

I think it's a different case.
Lets think on somenthing consuming our OSM data: if it finds a oneway=yes highway it will almost certainly look for lanes and turn:lanes to get the lanes properties (since it's know (by convention/agreement/common knowledge) that lanes and turn:lanes have all the info for oneway=yes highway segments)

This is exactly how OsmAnd does:
https://github.com/osmandapp/Osmand/blob/master/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java#L908

Now, if we are using only lanes:forward for a oneway=yeshighway, most probably the consumers won't find this info.

For lanes:forward=2 + lanes:backward=1 + lanes=3, while it looks superfluous, I can see two good things about it: a not-so-smart program could directly get the number of lanes for each direction (instead calculating lanes:backward from lanes - lanes:forward, for example) and we could also validate and do some QA work; it's possible to see that there is something wrong with lanes:forward=2 + lanes:backward=2 + lanes=3 while it isn't with lanes:forward=2 + lanes=3.

comment:12 by Klumbumbus, 9 years ago

We should keep the osm data simple when possible. So using the :forwad and :backward extensions when it is not required (oneway=yes) is not good. Therefore I think the warning is correct.

I think it happens very seldom that a oneway officially changes to a both-way. And if someone wrongly removes the oneway=yes, then this street is wrong anyway.

Remember also that the definion of lanes=* is different from the :lanes extension. lanes=* counts only motorized traffic and the extension all vehicles. http://wiki.openstreetmap.org/wiki/Lanes#Crossing_with_a_designated_lane_for_bicycles

in reply to:  4 ; comment:13 by Klumbumbus, 9 years ago

Replying to mdk:

As far as I can remember I never found a highway where I could use turn:lanes=*

It is very common on dual carriage ways in cities https://www.openstreetmap.org/way/307006065 or for motorways https://www.openstreetmap.org/way/22912721

in reply to:  description comment:14 by Klumbumbus, 9 years ago

Replying to mdk:

But the valitaor only warns about the 'forward' in the 'bus:lanes:forward' key, but no warning for 'turn:lanes:forward'.

This is because the validator rule is executed only once. If you remove 'bus:lanes:forward' and validate again you will get a warning about 'turn:lanes:forward'.
This is related to #10106

in reply to:  13 ; comment:15 by anonymous, 9 years ago

Replying to Klumbumbus:

Replying to mdk:

As far as I can remember I never found a highway where I could use turn:lanes=*

It is very common on dual carriage ways in cities https://www.openstreetmap.org/way/307006065 or for motorways https://www.openstreetmap.org/way/22912721

Sorry, I must be more precise: As far as I can remember I never found a highway which was not oneway where I could use turn:lanes=*.
If you tag highways which are not oneway, you have to use nearly allways *:forward and *:backward.

I think it happens very seldom that a oneway officially changes to a both-way. And if someone wrongly removes the oneway=yes, then this street is wrong anyway.

If you tag lanes on primary or secondary, they are normally oneway=no, but some parts have onewy=yes. During this mapping I often have to add and remove oneway=yes after splitting the ways. And it was hard to create a valid tagging. I know that on motorways and trunks life is much easier!

comment:16 by mdk, 9 years ago

Sorry, last comment was mine.

in reply to:  15 ; comment:17 by Klumbumbus, 9 years ago

Replying to anonymous:

Replying to Klumbumbus:

Replying to mdk:

As far as I can remember I never found a highway where I could use turn:lanes=*

It is very common on dual carriage ways in cities https://www.openstreetmap.org/way/307006065 or for motorways https://www.openstreetmap.org/way/22912721

Sorry, I must be more precise: As far as I can remember I never found a highway which was not oneway where I could use turn:lanes=*.
If you tag highways which are not oneway, you have to use nearly allways *:forward and *:backward.

yes, actually not "nearly allways" but "allways".

I think it happens very seldom that a oneway officially changes to a both-way. And if someone wrongly removes the oneway=yes, then this street is wrong anyway.

If you tag lanes on primary or secondary, they are normally oneway=no

It is very common that primaries or secondaries are oneway for longer parts in cities.

, but some parts have onewy=yes. During this mapping I often have to add and remove oneway=yes after splitting the ways.

Do you mean crossings like http://www.openstreetmap.org/#map=19/50.61803/12.83438?

And it was hard to create a valid tagging.

To me it seems simple:

  • oneway=yes -> simple turn:lanes=*
  • both way street -> add :forward and/or :backward extension

I always use the Styles/Lane_and_Road_Attributes when I map lanes or turn lanes. It helps a lot.

in reply to:  17 ; comment:18 by mdk, 9 years ago

If you tag lanes on primary or secondary, they are normally oneway=no

It is very common that primaries or secondaries are oneway for longer parts in cities.

But in Switzerland it's exactly the other way round. Primaries and secondaries nearly allways have two lanes (one in each direction) without segregation.

, but some parts have onewy=yes. During this mapping I often have to add and remove oneway=yes after splitting the ways.

Do you mean crossings like http://www.openstreetmap.org/#map=19/50.61803/12.83438?

exactly

And it was hard to create a valid tagging.

To me it seems simple:

  • oneway=yes -> simple turn:lanes=*
  • both way street -> add :forward and/or :backward extension

You are right. Again I was not precise enought: It's hard, when you have to deal with complex combinations of bus, taxi and bike:lanes.

I always use the Styles/Lane_and_Road_Attributes when I map lanes or turn lanes. It helps a lot.

me too :)

But complex situations still need some time to fiddle out a valid tagging.

Here a little riddle: How to do a valid lane tagging for way 28682845?
This road has 2 lanes. One lane is oneway=yes, but not for public transport trolly busses.
The second lane is only for public transport trolly busses, but the busses use the same lane in both directions (with special traffic lights for the busses) so this lane is oneway for busses, but changeing the direction all the time.
Feel free to map the lanes ...

in reply to:  18 comment:19 by Klumbumbus, 8 years ago

Replying to mdk:

Here a little riddle: How to do a valid lane tagging for way 28682845?
This road has 2 lanes. One lane is oneway=yes, but not for public transport trolly busses.
The second lane is only for public transport trolly busses, but the busses use the same lane in both directions (with special traffic lights for the busses) so this lane is oneway for busses, but changeing the direction all the time.
Feel free to map the lanes ...

According to your description I would tag it:

highway=*
lanes=2
oneway=yes
oneway:bus=no
vehicle:lanes=no|yes
bus:lanes=designated|yes

comment:20 by Klumbumbus, 8 years ago

Resolution: invalid
Status: newclosed

According to wiki e.g. http://wiki.openstreetmap.org/wiki/Key:turn:lanes and common usage you should use :forward/:backward extensions only for ways which are not oneway=yes. Therfore I see no error in the validator rule. The original example was already corrected/explained in comment:6 and comment:14.

Last edited 8 years ago by Klumbumbus (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.