#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 )
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)
Change History (15)
comment:1 follow-up: 2 Changed 13 years ago by
Cc: | KalleLampila added |
---|
comment:2 follow-up: 3 Changed 13 years ago by
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 Changed 13 years ago by
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 12 years ago by
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:
- list some tags (like
lit
,bridge
, …) which have to used together withhighway
/railway
/waterway
. - restrict to
bridge
and consider http://taginfo.openstreetmap.org/search?q=bridge - (rely on external tools like keepright: http://keepright.ipax.at/report_map.php?&layers=B00T)
Changed 11 years ago by
Attachment: | 5017.patch added |
---|
comment:5 Changed 11 years ago by
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 11 years ago by
What do you think of this patch? Is it okay to statically include data extracted from TagInfo?
comment:7 follow-up: 8 Changed 11 years ago by
Why not. If the result does not produce a lot of false positives.
comment:8 Changed 11 years ago by
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 follow-up: 10 Changed 11 years ago by
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 follow-up: 11 Changed 11 years ago by
Replying to bastiK:
name_*, *_ref
andreview
can be on any object andincline
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 Changed 11 years ago by
Replying to simon04:
Replying to bastiK:
name_*, *_ref
andreview
can be on any object andincline
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:14 Changed 11 years ago by
Replying to bastiK:
How do you do the SQL query?
You need the database from http://taginfo.openstreetmap.org/download
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.