-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Automatically add encoded values and tag parsers used in custom models #2935
Merged
+920
−959
Conversation
This file contains 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
# Conflicts: # core/src/main/java/com/graphhopper/GraphHopper.java # core/src/main/java/com/graphhopper/routing/util/DefaultVehicleTagParserFactory.java # core/src/main/java/com/graphhopper/routing/util/VehicleEncodedValues.java # core/src/main/java/com/graphhopper/routing/util/VehicleTagParsers.java # core/src/test/java/com/graphhopper/routing/util/parsers/HikeCustomModelTest.java
# Conflicts: # core/src/main/java/com/graphhopper/GraphHopper.java
# Conflicts: # core/src/main/java/com/graphhopper/routing/ev/DefaultEncodedValueFactory.java # core/src/main/java/com/graphhopper/routing/util/parsers/DefaultTagParserFactory.java
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.
With this PR we automatically determine the required encoded values and tag parsers, in the correct order, based on the profiles' custom models. Additionally, encoded values and tag parsers can still be added (or configured) via the
graph.encoded_values
configuration option, but this is no longer required for encoded values that are used in the custom models.(Vehicle)EncodedValuesFactory and (Vehicle)TagParserFactory are all gone and replaced by the new ImportRegistry that maps the strings appearing in the custom models and
graph.encoded_values
to 'import units' which specify the corresponding encoded values and the associated tag parsers.Closes #2595 where @otbutz already implemented a mechanism to automatically determine the tag parser dependencies.
I took the TopoSorter and the code that parses the encoded values from the custom models from this branch.