Modify

Opened 15 years ago

Closed 13 years ago

Last modified 13 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 13 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by KalleLampila, 15 years ago

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.

in reply to:  1 ; comment:2 by rb706, 15 years ago

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.

in reply to:  2 comment:3 by KalleLampila, 15 years ago

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 by simon04, 13 years ago

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:

by simon04, 13 years ago

Attachment: 5017.patch added

comment:5 by simon04, 13 years ago

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 by simon04, 13 years ago

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

comment:7 by stoecker, 13 years ago

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

in reply to:  7 comment:8 by simon04, 13 years ago

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 by bastiK, 13 years ago

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

in reply to:  9 ; comment:10 by simon04, 13 years ago

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?

in reply to:  10 comment:11 by bastiK, 13 years ago

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 by simon04, 13 years ago

Resolution: fixed
Status: newclosed

In [4777/josm]:

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

comment:13 by bastiK, 13 years ago

How do you do the SQL query?

in reply to:  13 comment:14 by simon04, 13 years ago

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. Next status will be 'reopened'.

Add Comment


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