Skip to content

Automatically add encoded values and tag parsers used in custom models - #2935

Merged
easbar merged 28 commits into
masterfrom
detect_evs
Feb 8, 2024
Merged

easbar merged 28 commits into
masterfrom
detect_evs

Conversation

@easbar

@easbar easbar commented Jan 24, 2024 •

Copy link
Copy Markdown
Member

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.

easbar and others added 11 commits January 18, 2024 14:44
# 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
@easbar
easbar marked this pull request as ready for review February 8, 2024 15:15
@easbar
easbar merged commit 96d7217 into master Feb 8, 2024
@easbar
easbar deleted the detect_evs branch February 8, 2024 16:03
@karussell karussell added this to the 9.0 milestone Mar 21, 2024

This branch was previously deployed

1 inactive deployment
benchmarks — 6e58cdbb Deployed Feb 8, 2024 by easbar
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 this pull request may close these issues.

2 participants