Skip to content

Turn restriction extraction, explicitly return false for no_* restrictions#2829

Merged
MoKob merged 2 commits intomasterfrom
check-no-restrictions
Sep 1, 2016
Merged

Turn restriction extraction, explicitly return false for no_* restrictions#2829
MoKob merged 2 commits intomasterfrom
check-no-restrictions

Conversation

@karenzshea
Copy link
Copy Markdown
Contributor

@karenzshea karenzshea commented Aug 31, 2016

Issue

Closes #2802. This doesn't address the caveat that @Codain brought up here, #2802 (comment), but I think this would require rewriting the parser to be able to know what had been previously returned to the InputRestrictionContainer on the same relation.

Also adds a test for a restriction yield, which is the undocumented restriction this was originally found on.

Tasklist

  • review
  • adjust for for comments

Requirements / Relations

n/a

cc @danpat @MoKob


And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | yield |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can we also add tests that start with only_ stuff like only_if_you_are_lucky or no_not_right_now to make sure we only use recognised tags?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But we don't right? All we care about is the no_ / only_ prefix.

The actual constraint is based on the fromWayId,viaNodeId,toWayId ids.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Well, only_if_you_are_lucky would pose a valid restriction. From chat, this is how OSM defines their turn restrictions, though. So we are fine here.

@MoKob MoKob merged commit 146eb3a into master Sep 1, 2016
@MoKob MoKob deleted the check-no-restrictions branch September 1, 2016 06:50
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.

3 participants