Modify

Opened 5 years ago

Last modified 12 months ago

#14532 new enhancement

check for invalid "layer" tagging on tunnel=* and bridge=*

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

Description

I found several wrong taggings for tunnel=* and bridge=*. For example I found lots of tunnel=* without layer=-1, but instead with ele=-1, level=-1 or width=-1. Theoretically also -2, -3 and so on, but I only saw -1. The same with bridge=*, but positive numbers. Sometimes the are also fixes by adding the missing layer=* tag, but leaving the other ones. In my opinion negative width values are always a failure. Only positive width values on highway=* and waterway=* could be valid.

It would be nice, if the validator would warn about ways with

  • waterway=*, tunnel=* level=-1
  • waterway=*, tunnel=* ele=-1
  • waterway=*, tunnel=* width=-1
  • highway=*, bridge=* level=1
  • highway=*, bridge=* ele=1

and offer correction to layer=*

Attachments (0)

Change History (12)

comment:1 Changed 5 years ago by naoliv

Cc: naoliv added

comment:2 Changed 5 years ago by Klumbumbus

Could you give numbers how often these cases appear in the database?

comment:3 Changed 5 years ago by naoliv

[waterway][tunnel][level] = 3095 ways (2992 without layer)
It seems that level is always wrong here (having layer or not)

[waterway][tunnel][ele] = 187 ways (91 with ele = -1)
I think that it also doesn't make sense to have ele in waterways

For width = -1 JOSM already detects and warns about the invalid negative value.

[highway][bridge][level] = 6956 ways
Randomly picked some and they all should be layer instead.

[highway][bridge][ele] = 1014 ways
Random picks also seemed wrong usage of ele

comment:4 Changed 2 years ago by mdk

At lest a check for negative width should be clear. Actually I get the more unspecific warning:
"unusual value of width: meters is default: point is decimal separator: if units, put space than unit"

comment:5 in reply to:  3 ; Changed 2 years ago by skyper

Replying to naoliv:

[waterway][tunnel][level] = 3095 ways (2992 without layer)
It seems that level is always wrong here (having layer or not)

A culvert in a building might have both level and layer with different values.

[waterway][tunnel][ele] = 187 ways (91 with ele = -1)
I think that it also doesn't make sense to have ele in waterways

Why not? Think about a culvert below sea level.

[highway][bridge][level] = 6956 ways
Randomly picked some and they all should be layer instead.

Mmh, complex bridges have both layer and level which do not need to have the same value.

[highway][bridge][ele] = 1014 ways
Random picks also seemed wrong usage of ele

But it is not wrong to tag a bridge with ele.

All examples usually need a layer tag, that is the warning I expect. Everything else is only informal.

comment:6 in reply to:  5 ; Changed 13 months ago by skyper

Replying to mdk:

At lest a check for negative width should be clear. Actually I get the more unspecific warning:
"unusual value of width: meters is default: point is decimal separator: if units, put space than unit"

I guess most of the tags with units could benefit from a better warning for negative values. Please open a new ticket.

Replying to skyper:

All examples usually need a layer tag, that is the warning I expect. Everything else is only informal.

Is it correct, that we can expect a layer=* with tunnel=* or bridge=* in general? Value no and tunnel=building_passage are exceptions. Anything else?

comment:7 Changed 12 months ago by mdk

The problem with a better check for negative values is addressed in #21026.

comment:8 Changed 12 months ago by Klumbumbus

In 17934/josm:

Fix #21026, see #14532 - Better warnings for negative numeric values

comment:9 Changed 12 months ago by Klumbumbus

In 17938/josm:

See #21026, see #14532 - Fix unit test

comment:10 Changed 12 months ago by Klumbumbus

In 17939/josm:

See #21026, see #14532 - Fix unit test

comment:11 in reply to:  6 Changed 12 months ago by skyper

Replying to skyper:

Replying to skyper:

All examples usually need a layer tag, that is the warning I expect. Everything else is only informal.

Is it correct, that we can expect a layer=* with tunnel=* or bridge=* in general? Value no and tunnel=building_passage are exceptions. Anything else?

See #9819.

comment:12 Changed 12 months ago by Klumbumbus

In 17955/josm:

see #21026, see #14532 - Fix i18n

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to mdk
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.