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

invalid turn type returned #5039

Closed
4 tasks done
karenzshea opened this issue Apr 19, 2018 · 0 comments · Fixed by #5040
Closed
4 tasks done

invalid turn type returned #5039

karenzshea opened this issue Apr 19, 2018 · 0 comments · Fixed by #5040

Comments

@karenzshea
Copy link
Contributor

karenzshea commented Apr 19, 2018

A request in New Zealand (extract can be fetched from geofabrik), I see a turn type that shouldn't be exposed:

$ curl 'localhost:5000/route/v1/car/171.21113,-42.450158;171.12712383270264,-42.58207906066402?steps=true' | jq '.routes[].legs[].steps[].maneuver.type'

Returns,

"depart"
"exit roundabout"
"invalid"
"exit rotary"
"arrive"

In debug mode, this assertion is triggered which assumes that for a step to be collapsed into the one before it, the geometry indices of the two steps should be adjacent.

I managed to narrow down a possible cause for this in the segregated intersection collapsing, so that when I comment out the segregated intersection collapsing in route_api and rerun the same request, I see these turn types emitted

"depart"
"exit roundabout"
"new name"
"new name"
"new name"
"rotary"
"exit rotary"
"arrive"

Inspecting this route though, I'm not sure what should be considered a segregated intersection,
https://gist.github.com/karenzshea/8ff491dbe7155fc8a94cb7701ab2aa89

Next steps

  • Determine which parts of the code are incorrectly collapsing steps
  • Is an intersection getting misclassified as segregated?
  • Write a test case
  • Fix either invalid turn type emission, or segregated intersection misclassification

cc @dgearhart

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 a pull request may close this issue.

1 participant