Skip to content
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

Merged
merged 26 commits into from
Jun 15, 2021
Merged

Conversation

gknisely
Copy link
Member

@gknisely gknisely commented Jun 1, 2021

Issue

Allows support for oneway pedestrian ways.

Before. Via oneway. (Ignores oneway exit for a ride)

Screenshot from 2021-06-14 21-52-22

After. Via oneway.

Screenshot from 2021-06-14 21-53-35

Before. Ending on onway exit for a ride.

Screenshot from 2021-06-14 21-52-08

After. Ending on onway exit for a ride.

Screenshot from 2021-06-14 21-53-19

Before. Oneway footpath

Screenshot from 2021-06-14 21-51-57

After. Oneway footpath

Screenshot from 2021-06-14 21-53-09

Before. Foot restriction (enter only) Restriction ignored.

Screenshot from 2021-06-14 21-51-20

After. Foot restriction (enter only)

Screenshot from 2021-06-14 21-52-40

Tasklist

  • Add tests
  • Update the changelog
  • If you made changes to the lua files, update the taginfo too.

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

@gknisely gknisely changed the title [WIP] oneway support for pedestrian access [WIP] oneway support for pedestrian access and foot restrictions Jun 15, 2021
@gknisely gknisely changed the title [WIP] oneway support for pedestrian access and foot restrictions oneway support for pedestrian access and foot restrictions Jun 15, 2021
@@ -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
Copy link
Member Author

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
Copy link
Member Author

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()) {
Copy link
Member Author

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() ||
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added restrictions check

merkispavel
merkispavel previously approved these changes Jun 15, 2021
Copy link
Contributor

@merkispavel merkispavel left a 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

@@ -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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why spare3?

dgearhart
dgearhart previously approved these changes Jun 15, 2021
Copy link
Member

@dgearhart dgearhart left a 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

@gknisely gknisely dismissed stale reviews from dgearhart and merkispavel via f3459b9 June 15, 2021 13:49
Copy link
Member

@dgearhart dgearhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@gknisely gknisely merged commit c397809 into master Jun 15, 2021
@gknisely gknisely deleted the ped_access branch February 22, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants