Skip to content

Don't add restrictions when we don't understand the tag #2802

@danpat

Description

@danpat

In #2801, @Codain found a relation with type=restriction and restriction=yield, which is not a documented type.

However, our restriction parser treated this like a restriction=no_turn, and prevented turns from a slip-road onto a major highway.

The tagging is bad, but we should also not fail so badly when we hit a tag like this.

Currently, the restriction parser only looks for type=restriction, and then tests if it's restriction=only*. If it's any other restriction=* value, we treat it like a no_turn and remove edges from the graph.

We should, at a minimum, check that the restriction is one of the values on the OSM wiki http://wiki.openstreetmap.org/wiki/Relation:restriction:

If the first word is "no_", then no routing is possible from the "from" to the "to" member. If it is "only_", then you know that the only routing originating from the "from" member leads to the "to" member.

We aren't checking for no_* at the moment, we should probably change that.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions