Repository navigation
Work towards removing TurnWeighting - #1842
Merged
Merged
Conversation
# Conflicts: # core/src/main/java/com/graphhopper/routing/weighting/AbstractAdjustedWeighting.java # web-bundle/src/main/java/com/graphhopper/resources/InfoResource.java
Member
Author
|
Can we merge this ? |
karussell
approved these changes
Jan 10, 2020
| */ | ||
| double getMinWeight(double distance); | ||
|
|
||
| double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse); |
Member
There was a problem hiding this comment.
Can you add javadocs? And highlight the difference to calcWeight?
Closed
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.
This is some preliminary work for #1820, mainly to reduce the diff when we actually fix #1820.
INFINITE_U_TURN_COSTSconstant intoWeighting.Weighting#calcEdgeWeight/Millis. For now this is a pure convenience method that just callscalcWeightwithprevOrNext=-1. For Remove TurnWeighting #1820 this will be the other way around: InAbstractWeightingwe will havecalcWeightwhich usescalcEdgeWeightand addscalcTurnWeight. Subclasses will then only overridecalcEdgeWeight/Millisand leave the turn cost calculation toAbstractWeighting. The turn cost calculation can then be adjusted by changing theTurnCostProviderimplementation which is passed toAbstractWeightingvia its constructor (at least this is what I currently think we should do).FlagEncoder#supports(TurnWeighting.class)withFlagEncoder#supportsTurnCosts(). Note that this it what it was like before 0.4 according to the changelogThe actual work for #1820 is happening here: https://github.com/graphhopper/graphhopper/tree/remove_turn_weighting, but its not in (near) a mergeable state yet.
Any thoughts ?