Add more PathDetails#1142
Merged
Merged
Conversation
boldtrn
commented
Aug 22, 2017
| public boolean isEdgeDifferentToLastEdge(EdgeIteratorState edge) { | ||
| if (edge.getEdge() != edgeId) { | ||
| edgeId = edge.getEdge(); | ||
| time = weighting.calcMillis(edge, encoder.isBackward(edge.getFlags()), -1); |
Member
Author
There was a problem hiding this comment.
Since we don't have the reverse Flag here, I used this "hack" to determine the direction of the flag. Not sure if this is valid or if we should do it different?
Member
There was a problem hiding this comment.
The edges in the Path should be already properly directed so reverse should be always false for the path details?
karussell
requested changes
Aug 22, 2017
karussell
left a comment
Member
There was a problem hiding this comment.
Thanks a lot! I really like how simple and clean this looks now :)
| assertEquals(3, averageSpeedDetails.get(3).getFirst()); | ||
| assertEquals(4, averageSpeedDetails.get(3).getLast()); | ||
|
|
||
| List<PathDetail> streetNameDetails = details.get(STREET_NAME); |
Member
There was a problem hiding this comment.
We should have different test methods for the different path details (and maybe reuse the common parts)
| else if (value.getValue() instanceof Integer) | ||
| gen.writeNumber((Integer) value.getValue()); | ||
| else if (value.getValue() instanceof Integer) | ||
| gen.writeNumber((Integer) value.getValue()); |
Member
There was a problem hiding this comment.
I think this is somehow duplicated?
karussell
approved these changes
Aug 23, 2017
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.
Fixes #1140.
I added all PathDetails that were requested in #1140. In order to add the time, I used the Weighting. I don't especially like this, as it adds an additional dependency, but I think it's the best solution for this problem.