-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check required tags of maneuver
relations
#4905
Conversation
e9f5b75
to
8b6fe41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is really fixing the issue, seems to me that via ways now only work if you also pass in a via node.
@@ -103,18 +104,12 @@ ManeuverOverrideRelationParser::TryParse(const osmium::Relation &relation) const | |||
} | |||
} | |||
|
|||
if (from && (via || via_ways.size() > 0) && to) | |||
if (from != SPECIAL_OSM_WAYID && to != SPECIAL_OSM_WAYID && via_node != SPECIAL_OSM_NODEID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check won't work when there are only via ways right? In that case via_node
will not be set only via_ways
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per chat, that is intended behavior, because a way is not sufficient to infer the instruction position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍 The spec is a little confusing, but there needs to be a via
node even if there is a via way
.
@@ -103,18 +104,12 @@ ManeuverOverrideRelationParser::TryParse(const osmium::Relation &relation) const | |||
} | |||
} | |||
|
|||
if (from && (via || via_ways.size() > 0) && to) | |||
if (from != SPECIAL_OSM_WAYID && to != SPECIAL_OSM_WAYID && via_node != SPECIAL_OSM_NODEID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per chat, that is intended behavior, because a way is not sufficient to infer the instruction position.
8b6fe41
to
d7ad051
Compare
@TheMarex I've added checks for |
d7ad051
to
0b2d772
Compare
- Changes from 5.15.2: - Guidance - ADDED Project-OSRM#4676: Support for maneuver override relation, allowing data-driven overrides for turn-by-turn instructions [Project-OSRM#4676](Project-OSRM#4676) - CHANGED Project-OSRM#4830: Announce reference change if names are empty - CHANGED Project-OSRM#4835: MAXIMAL_ALLOWED_SEPARATION_WIDTH increased to 12 meters - CHANGED Project-OSRM#4842: Lower priority links from a motorway now are used as motorway links [Project-OSRM#4842](Project-OSRM#4842) - CHANGED Project-OSRM#4895: Use ramp bifurcations as fork intersections [Project-OSRM#4895](Project-OSRM#4895) - CHANGED Project-OSRM#4893: Handle motorway forks with links as normal motorway intersections[Project-OSRM#4893](Project-OSRM#4893) - FIXED Project-OSRM#4905: Check required tags of `maneuver` relations [Project-OSRM#4905](Project-OSRM#4905) - Profile: - FIXED: `highway=service` will now be used for restricted access, `access=private` is still disabled for snapping. - ADDED Project-OSRM#4775: Exposes more information to the turn function, now being able to set turn weights with highway and access information of the turn as well as other roads at the intersection [Project-OSRM#4775](Project-OSRM#4775) - FIXED Project-OSRM#4763: Add support for non-numerical units in car profile for maxheight [Project-OSRM#4763](Project-OSRM#4763) - ADDED Project-OSRM#4872: Handling of `barrier=height_restrictor` nodes [Project-OSRM#4872](Project-OSRM#4872)
Issue
Accordingly to https://github.com/Project-OSRM/osrm-backend/wiki/Maneuver-override-tag ways
from
,to
and nodevia
roles are required in relations withtype=maneuver
.PR adds an additional check for
via_node
ids to filter out invalidmaneuver
relations./cc @karenzshea @TheMarex
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?