Complete support for no_entry and no_exit turn restrictions (#5988)

The internal representation of turn restrictions expects only one
`from` way and only one `to` way.

`no_entry` and `no_exit` turn restrictions can have multiple `from` and
`to` ways respectively. This means they are not fully supported by
OSRM's restriction parser.

We complete support for these turn restriction types by parsing all
ways and converting a valid restriction with multiple `from`/`to` members
into multiple internal restrictions.
This commit is contained in:
Michael Bell
2022-08-22 12:58:16 +01:00
committed by GitHub
parent b4b1aea567
commit 3cfd0e8334
5 changed files with 184 additions and 31 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class RestrictionParser
RestrictionParser(bool use_turn_restrictions,
bool parse_conditionals,
std::vector<std::string> &restrictions);
boost::optional<InputTurnRestriction> TryParse(const osmium::Relation &relation) const;
std::vector<InputTurnRestriction> TryParse(const osmium::Relation &relation) const;
private:
bool ShouldIgnoreRestriction(const std::string &except_tag_string) const;