#19609 closed defect (fixed)
[Patch] Unneeded "turn:lanes:forward without lanes:forward" warnings
| Reported by: | aceman | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 20.08 |
| Component: | Core validator | Version: | tested |
| Keywords: | lanes lanes-tagging | Cc: |
Description
JOSM 16812 started to issue a validator warning like "turn:lanes:forward without lanes:forward" also on roads that have an even number of lanes. In such case, it is implicit that on a oneway=no road there are half number of lanes in each direction. So what is this warning for? It didn't happen in the past.
Attachments (2)
Change History (13)
comment:1 by , 5 years ago
| Keywords: | lanes lanes-tagging added |
|---|---|
| Summary: | Unneded "turn:lanes:forward without lanes:forward" warnings → Unneeded "turn:lanes:forward without lanes:forward" warnings |
follow-up: 5 comment:2 by , 5 years ago
I don't know, I just say this warning is new and reports false positives. It is also true that the number of lanes described in *:lanes tags is allowed to be more than those in the 'lanes' tags (as those only count car-wide lanes). And JOSM does not warn of those (which is correct). How does explicitly tagging lanes:* help in the situation? Do you at least try to check that it is lower or equal to those in *:lanes ?
comment:3 by , 5 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 5 years ago
I had a look at it and I tend to simply downgrade the test for lanes:forward/backward to informal and exclude more cases matching other tests.
The test for lanes:* vs. *:lanes is only run for motorway[_link]/trunk[_link] on hard implemented keys and both_ways` is ignored.
There is a informal warning about only one of lanes:forward/backward and a test for uneven lanes=* without lanes:forward/backward.
The interesting cases are even number of lanes where the number of lanes per direction are not equal and cases with higher number of values of *:lanes than lanes:*.
I did not understand, yet, how to completely work with lists in mapcss. How do I get the values from tags matching a regex like /^.*:lanes:forward$/ to split them at | and count the values to check that they have the same number of values and that the number is equal or higher to lanes:forward.
by , 5 years ago
| Attachment: | josm_19609_wip.patch added |
|---|
first patch still needs some testing and some cases are missing.
comment:5 by , 5 years ago
Replying to aceman:
I don't know, I just say this warning is new and reports false positives. It is also true that the number of lanes described in *:lanes tags is allowed to be more than those in the 'lanes' tags (as those only count car-wide lanes). And JOSM does not warn of those (which is correct). How does explicitly tagging lanes:* help in the situation? Do you at least try to check that it is lower or equal to those in *:lanes ?
There is Lanes.java.
Some test are not possible in MapCSS right now, as working with lists and matrixs is not well supported, yet.
I`ve attached a first version of a possible fix (josm_19609_wip.patch) which:
- add a warning for missing
lanes=*with*:lanes:forward/backward=* - excludes
highway=motorwayfrom "odd number of lanes" test asoneway=yesis implied and there is another informal warning about missingoneway=* - downgrades the general warning for missing
lanes:forward/backwardto informal and fine tuning- exclude several cases which have an own warning, like odd numbers of lanes or existing
lanes:forward/backward=*.
- exclude several cases which have an own warning, like odd numbers of lanes or existing
follow-up: 7 comment:6 by , 5 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → new |
| Summary: | Unneeded "turn:lanes:forward without lanes:forward" warnings → [Patch] Unneeded "turn:lanes:forward without lanes:forward" warnings |
Found no problem. Think the patch can be applied.
There are still cases in the example file where a warning is needed but this is a different story for an own ticket.
comment:7 by , 5 years ago
follow-up: 11 comment:9 by , 5 years ago
Thanks skyper. Please don't add further `{0}` in translations strings (this will require a retranslation after #11153) and try to reuse translation strings if possible.
comment:10 by , 5 years ago
| Milestone: | → 20.08 |
|---|
comment:11 by , 5 years ago
Replying to Klumbumbus:
Thanks skyper. Please don't add further
`{0}`in translations strings (this will require a retranslation after #11153) and try to reuse translation strings if possible.
Sorry, was not aware of this ticket.



See #10932 (r16769).
What is your suggestion? Downgrading the test to informal for even numbers of
lanesand number of values*:lanes:[backward|forward]=*are half of value oflanesand no*:both_ways=*present ? The problem is that as soon as there is a lane which does not count tolaneslikebicycle:lanes*or shortbus:lanes*on a stop (passing_lane) the situation is quite complicated withoutlanes:[forward/backward]