Insert Shape Points at TrafficSpeed Breakpoints#2451
Merged
Conversation
purew
reviewed
Jul 6, 2020
purew
reviewed
Jul 6, 2020
purew
reviewed
Jul 6, 2020
| double distance_total_pct = src_pct; | ||
| auto speed_itr = std::find_if(speeds.cbegin(), speeds.cend(), | ||
| [distance_total_pct](const decltype(speeds)::value_type& s) { | ||
| return distance_total_pct <= std::get<0>(s); |
Contributor
There was a problem hiding this comment.
I re-read this a few times. Could distance_total_pct be changed to src_pct to better describe to the reader that the iterator only returns speeds starting at src_pct?
purew
reviewed
Jul 6, 2020
|
|
||
| // Set speed if requested | ||
| if (controller.attributes.at(kEdgeSpeed)) { | ||
| // TODO: if this is a transit edge then the costing will throw |
Contributor
There was a problem hiding this comment.
Is this intended to be fixed in this PR or is it a caveat for future us?
Member
Author
There was a problem hiding this comment.
its been broken for a while and the fix is non-trivial. i think we should fix this in a subsequent pr (this happens in another spot at well)
danpat
previously approved these changes
Jul 8, 2020
danpat
approved these changes
Jul 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Edges who have live speeds can change their speeds at break points along the edge. Where that happens we need to change the speed value we assign in shape attributes. This PR does that by inserting new shape points at the breakpoints of a given speed record on an edge.