Modify

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

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

josm_19609_wip.patch (4.8 KB) - added by skyper 7 months ago.
first patch still needs some testing and some cases are missing.
josm_19609_lanes_tagging_samples.osm (8.1 KB) - added by skyper 7 months ago.
update of example file

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 months ago by skyper

Keywords: lanes lanes-tagging added
Summary: Unneded "turn:lanes:forward without lanes:forward" warningsUnneeded "turn:lanes:forward without lanes:forward" warnings

See #10932 (r16769).

What is your suggestion? Downgrading the test to informal for even numbers of lanes and number of values *:lanes:[backward|forward]=* are half of value of lanes and no *:both_ways=* present ? The problem is that as soon as there is a lane which does not count to lanes like bicycle:lanes* or short bus:lanes* on a stop (passing_lane) the situation is quite complicated without lanes:[forward/backward]

comment:2 Changed 7 months ago by 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 ?

comment:3 Changed 7 months ago by skyper

Owner: changed from team to skyper
Status: newassigned

comment:4 Changed 7 months ago by skyper

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.

Changed 7 months ago by skyper

Attachment: josm_19609_wip.patch added

first patch still needs some testing and some cases are missing.

comment:5 in reply to:  2 Changed 7 months ago by skyper

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=motorway from "odd number of lanes" test as oneway=yes is implied and there is another informal warning about missing oneway=*
  • downgrades the general warning for missing lanes:forward/backward to informal and fine tuning
    • exclude several cases which have an own warning, like odd numbers of lanes or existing lanes:forward/backward=*.

comment:6 Changed 7 months ago by skyper

Owner: changed from skyper to team
Status: assignednew
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 in reply to:  6 Changed 7 months ago by skyper

Replying to skyper:

There are still cases in the example file where a warning is needed but this is a different story for an own ticket.

See #19653.

Changed 7 months ago by skyper

update of example file

comment:8 Changed 7 months ago by Klumbumbus

Resolution: fixed
Status: newclosed

In 16860/josm:

fix #19609 - Adjust lanes warnings (patch by skyper)

comment:9 Changed 7 months ago by 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.

comment:10 Changed 7 months ago by Klumbumbus

Milestone: 20.08

comment:11 in reply to:  9 Changed 7 months ago by skyper

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.

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.