-
Notifications
You must be signed in to change notification settings - Fork 661
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
oneway support for pedestrian access and foot restrictions #3123
Conversation
…and getting the bits.
…ay:foot will modify any type of way.
@@ -1173,10 +1197,15 @@ function filter_tags_generic(kv) | |||
kv["moped_backward"] = kv["moped_forward"] | |||
end | |||
|
|||
if (kv["motorcycle_backward"] == "false" and (kv["oneway:motorcycle"] == nil or oneway[kv["oneway:motorcycle"]] == false or kv["oneway:motorcycle"] == "no")) then |
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.
Small update. Found a bug via the new gurka test
@@ -1237,6 +1270,24 @@ function filter_tags_generic(kv) | |||
kv["bike_backward"] = forwards | |||
end | |||
|
|||
if (kv["oneway:moped"] == "-1" or kv["oneway:mofa"] == "-1") then |
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.
More issues found via the gurka test from lines 1273 to 1283
forward_access |= kWheelchairAccess; | ||
reverse_access |= kWheelchairAccess; | ||
if (way.use() != Use::kSteps) { | ||
if (way.wheelchair_tag() && way.wheelchair()) { |
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.
Wheelchair routing and logic needs to be finished. This was started a long time ago but never finished.
@@ -551,14 +551,17 @@ bool PedestrianCost::Allowed(const baldr::DirectedEdge* edge, | |||
const uint64_t current_time, | |||
const uint32_t tz_index, | |||
uint8_t& restriction_idx) const { | |||
if (!IsAccessible(edge) || (edge->surface() > minimal_allowed_surface_) || edge->is_shortcut() || |
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.
Added restrictions check
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.
Nice! The only thing is if someone could review the lua because I didn't
valhalla/mjolnir/osmway.h
Outdated
@@ -1689,7 +1707,7 @@ struct OSMWay { | |||
uint16_t use_sidepath_ : 1; | |||
uint16_t bike_forward_ : 1; | |||
uint16_t bike_backward_ : 1; | |||
uint16_t spare1_ : 4; | |||
uint16_t spare3_ : 4; |
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.
nit: why spare3?
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.
other than the nit - lgtm
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.
🚢
Issue
Allows support for oneway pedestrian ways.
Before. Via oneway. (Ignores oneway exit for a ride)
After. Via oneway.
Before. Ending on onway exit for a ride.
After. Ending on onway exit for a ride.
Before. Oneway footpath
After. Oneway footpath
Before. Foot restriction (enter only) Restriction ignored.
After. Foot restriction (enter only)
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?