Modify

Opened 7 years ago

Last modified 3 years 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 by naoliv, 7 years ago

Cc: naoliv added

comment:2 by Klumbumbus, 7 years ago

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

comment:3 by naoliv, 7 years ago

[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 by mdk, 4 years ago

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"

in reply to:  3 ; comment:5 by skyper, 4 years ago

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.

in reply to:  5 ; comment:6 by skyper, 3 years ago

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 by mdk, 3 years ago

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

comment:8 by Klumbumbus, 3 years ago

In 17934/josm:

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

comment:9 by Klumbumbus, 3 years ago

In 17938/josm:

See #21026, see #14532 - Fix unit test

comment:10 by Klumbumbus, 3 years ago

In 17939/josm:

See #21026, see #14532 - Fix unit test

in reply to:  6 comment:11 by skyper, 3 years ago

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 by Klumbumbus, 3 years ago

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. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to mdk.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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