Modify

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#5017 closed enhancement (fixed)

[Patch needs review] new check: ways tagged with bridge=yes but without highway

Reported by: rb706 Owned by: team
Priority: major Milestone:
Component: Core validator Version:
Keywords: Cc: KalleLampila

Description (last modified by simon04)

Bridges tagged with bridge=yes, but without a highway tag (unclassified, track, ...) will be ignored by routing software. The JOSM validator should warn about such ways.

see also http://forum.openstreetmap.org/viewtopic.php?id=7512

Attachments (1)

5017.patch (5.7 KB) - added by simon04 8 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 9 years ago by KalleLampila

Cc: KalleLampila added

Bridge is not only to relaeted in higways. Example with railway you can use bridge tag.

I suggest general approach here. Make list tags that should not exist alone (ex. bridge, name, lit, surface, maxspeed...) and give warning if there is only this kind of tags.

comment:2 in reply to:  1 ; Changed 9 years ago by rb706

Replying to Kalle Lampila:

Bridge is not only to relaeted in higways. Example with railway you can use bridge tag.

I suggest general approach here. Make list tags that should not exist alone (ex. bridge, name, lit, surface, maxspeed...) and give warning if there is only this kind of tags.

In my case, this would not have prevented me from making the change. I created a bridge with bridge=yes and layer=1, so there was an additional tag (the layer tag) in my change besides "bridge".

The check should make sure that a bridge does not interrupt a highway (railway, ...). This way it now also has been implemented in keepright.

comment:3 in reply to:  2 Changed 9 years ago by KalleLampila

Replying to rb706:

I suggest general approach here. Make list tags that should not exist alone (ex. bridge, name, lit, surface, maxspeed...) and give warning if there is only this kind of tags.

In my case, this would not have prevented me from making the change. I created a bridge with bridge=yes and layer=1, so there was an additional tag (the layer tag) in my change besides "bridge".

No this is not true. Both bridge and layer are tags that should not exist alone, so general solution catch up this situation. (it also catch up situation if there is only layer tag in way)

comment:4 Changed 8 years ago by simon04

From http://forum.openstreetmap.org/viewtopic.php?id=7512:

Unterbricht eine Brücke den highway (und meinetwegen railway/waterway), der an sie anschließenden Wege, dadurch, dass das highway-(railway/waterway) Attribut fehlt, dann ist das höchstwahrscheinlich ein Fehler.


We have a few options to deal with these bugs:

Changed 8 years ago by simon04

Attachment: 5017.patch added

comment:5 Changed 8 years ago by simon04

Description: modified (diff)
Summary: new check: ways tagged with bridge=yes but without highway[Patch needs review] new check: ways tagged with bridge=yes but without highway

Patch attached. Testing for typical tag combinations which were derived from the taginfo database (SQL code included as source code comment).

comment:6 Changed 8 years ago by simon04

What do you think of this patch? Is it okay to statically include data extracted from TagInfo?

comment:7 Changed 8 years ago by stoecker

Why not. If the result does not produce a lot of false positives.

comment:8 in reply to:  7 Changed 8 years ago by simon04

Replying to stoecker:

Why not. If the result does not produce a lot of false positives.

It shouldn't as only combinations are tested that appear at least in 97% of the cases (according to TagInfo).

I'll commit this patch then ...

comment:9 Changed 8 years ago by bastiK

I wouldn't rely completely on the correlation:

name_*, *_ref and review can be on any object and incline would also be correct for railway.

Maybe you can put the rules in tagchecker.cfg?

way  : W : lanes == * && highway != *                                     # lanes=* without highway=*
way  : W : tunnel == * && highway != * && railway != * && waterway != *   # tunnel=* without highway, railway or waterway

comment:10 in reply to:  9 ; Changed 8 years ago by simon04

Replying to bastiK:

name_*, *_ref and review can be on any object and incline would also be correct for railway.

Good point. So these tags have to be filtered manually.

Maybe you can put the rules in tagchecker.cfg?

That could be done, yes. Do you see a problem that tagchecker.cfg would then get (a bit|very) longer?

comment:11 in reply to:  10 Changed 8 years ago by bastiK

Replying to simon04:

Replying to bastiK:

name_*, *_ref and review can be on any object and incline would also be correct for railway.

Good point. So these tags have to be filtered manually.

Maybe you can put the rules in tagchecker.cfg?

That could be done, yes.

I know you have already finished the test class, but for future maintenance it's better to keep the code slim. :)

Do you see a problem that tagchecker.cfg would then get (a bit|very) longer?

Should be fine.

comment:12 Changed 8 years ago by simon04

Resolution: fixed
Status: newclosed

In [4777/josm]:

fix #5017 - Testing for typical tag combinations (derived from Taginfo)

comment:13 Changed 8 years ago by bastiK

How do you do the SQL query?

comment:14 in reply to:  13 Changed 8 years ago by simon04

Replying to bastiK:

How do you do the SQL query?

You need the database from http://taginfo.openstreetmap.org/download

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.