Repository navigation
Load EncodingManager from properties instead of config - #2607
Conversation
| flagEncodersString = ghConfig.getString("graph.flag_encoders", flagEncodersString); | ||
| encodedValuesString = ghConfig.getString("graph.encoded_values", encodedValuesString); | ||
| dateRangeParserString = ghConfig.getString("datareader.date_range_parser_day", dateRangeParserString); | ||
| buildEncodingManagerAndOSMParsers(flagEncodersString, encodedValuesString, dateRangeParserString, profilesByName.values()); |
There was a problem hiding this comment.
We no longer build the encoding manager in init(), because when we are loading we want to create it from the stored properties instead.
| if (encodingManager == null) | ||
| // we did not call init(), so we build the encoding manager now. | ||
| // just like when calling init, users have to make sure they use the same setup for import and load | ||
|
|
There was a problem hiding this comment.
This problem no longer exists. The encoding manager is never created in init() so it does not matter whether we called it or not.
| if (!new File(ghLocation).exists()) | ||
| if (!new File(ghLocation).exists()) { | ||
| // there is nothing to load, so we create the EM from the config | ||
| buildEncodingManagerAndOSMParsers(flagEncodersString, encodedValuesString, dateRangeParserString, profilesByName.values()); |
There was a problem hiding this comment.
We build the encoding manager (and the parsers) from the config file, but only when there is no -gh folder.
| if (!properties.loadExisting()) | ||
| return false; |
There was a problem hiding this comment.
I just realized that this could be problematic: When there is a -gh folder, but it is empty (no properties file) we will return here but no encoding manager and no base graph was created. Can we move the properties.loadExisting() call further up, before obtaining the read lock? Or can we create the lock earlier? And do we really need this lock?
There was a problem hiding this comment.
When there is a -gh folder, but it is empty (no properties file) we will return here but no encoding manager and no base graph was created.
What would be the problem in that case?
And do we really need this lock?
We have no other protection against multiple writes into the same folder.
There was a problem hiding this comment.
What would be the problem in that case?
Right now we get an IllegalStateException when the -gh folder exists, but the properties file is missing or the entire folder is empty. The reason is that baseGraph is null and we check for null in the process method, so actually it is rather like a NullPointerException.
We have no other protection against multiple writes into the same folder.
Ok, and that protects us in case there are multiple GH processes using the same folder or why do we need this protection? But here we also do not need to write anything, we just want to read the contents of the folder and properties file (if they exist). Would it be OK to call properties.loadExisting() before obtaining the lock? I still think there should simply be static methods that tell us whether a certain file exists or allow us to load it without creating any DataAccess objects (let alone without obtaining any (write?) locks :), but this is for another issue...).
There was a problem hiding this comment.
I fixed the issue here: cadbca1, so when we import into an empty (but existing) folder now everything works. Still, the code is quite twisted :)
There was a problem hiding this comment.
Ok, and that protects us in case there are multiple GH processes using the same folder or why do we need this protection?
Yes
I still think there should simply be static methods that tell us whether a certain file exists
But the flush happens after the import (except if MMAP) and so some file is required as early as possible so that we can do the check (?)
There was a problem hiding this comment.
I just meant for loading something it should not be required to create a java object first, i.e. :
DataAccess da = new DataAccess();
da.loadExisting();
vs.
DataAccess da = DataAccess.load("file"); // already 'loaded'
But regarding the lock file yes we need such a file as early as possible to do such a check.
Actually I think the file should be created when the data access object is created because this does not work any other way for MMAP. So if we want to use MMAP and RAM behind the same interface it would be nice to make it symmetric and since there is only one way for MMAP it should be the same for RAM.
| String encodedValueStr = properties.get("graph.encoded_values"); | ||
| if (!encodingManager.toEncodedValuesAsString().equalsIgnoreCase(encodedValueStr)) { | ||
| throw new IllegalStateException("Encoded values do not match:" | ||
| + "\nGraphhopper config: " + encodingManager.toEncodedValuesAsString() | ||
| + "\nLoaded graph: " + encodedValueStr | ||
| + "\nChange configuration to match the graph or delete " + baseGraph.getDirectory().getLocation()); | ||
| } |
There was a problem hiding this comment.
This is the code that was forcing us to pass the same configuration when loading the graph even though it was already determined by the import.
|
|
||
| @Override | ||
| public int getVersion() { | ||
| // todonow: there isn't really any 'version' here... |
There was a problem hiding this comment.
Do we need some kind of version for EVs? For example this PR changes the format of the serialized strings. Maybe something like Constants.VERSION_EV?
There was a problem hiding this comment.
I think Constants.VERSION_EV should indicate the version/format of the string representation we use to store the encoded values on disk. But there should no longer be a need for EncodedValue#getVersion, especially when it is just a checksum of all the different fields and we store every field anyway? Right? I did not remove it yet and did not add a check for Constants.VERSION_EV yet either.
There was a problem hiding this comment.
Actually I renamed it to Constants.VERSION_EM now and it represents the format of the stored EM in general, not just for encoded values.
There was a problem hiding this comment.
especially when it is just a checksum of all the different fields and we store every field anyway? Right?
Yes
| if (!properties.loadExisting()) | ||
| return false; |
There was a problem hiding this comment.
When there is a -gh folder, but it is empty (no properties file) we will return here but no encoding manager and no base graph was created.
What would be the problem in that case?
And do we really need this lock?
We have no other protection against multiple writes into the same folder.
|
|
||
| @Override | ||
| public int getVersion() { | ||
| // todonow: there isn't really any 'version' here... |
| @Override | ||
| public boolean equals(Object o) { | ||
| if (!super.equals(o)) return false; | ||
| DecimalEncodedValueImpl that = (DecimalEncodedValueImpl) o; | ||
| return Double.compare(that.factor, factor) == 0 && useMaximumAsInfinity == that.useMaximumAsInfinity | ||
| && defaultIsInfinity == that.defaultIsInfinity; | ||
| } |
There was a problem hiding this comment.
Was there any reason all the EV implementations were overriding the default equals method? I could not find any and removed them.
|
|
||
| @Override | ||
| public int getVersion() { | ||
| // todonow: there isn't really any 'version' here... |
There was a problem hiding this comment.
I think Constants.VERSION_EV should indicate the version/format of the string representation we use to store the encoded values on disk. But there should no longer be a need for EncodedValue#getVersion, especially when it is just a checksum of all the different fields and we store every field anyway? Right? I did not remove it yet and did not add a check for Constants.VERSION_EV yet either.
| // we do not 'init' the encoded value, but we still need to update the edge config | ||
| // todonow: real ugly, bc right now it only works for IntEncodedValueImpl. at the very least there should | ||
| // be EncodedValue#getBits(), but maybe we need to reconsider the way the encoding manager or the | ||
| // encoded values are serialized/deserialized. | ||
| em.edgeConfig.next(((IntEncodedValueImpl) encodedValue).bits); | ||
| if (encodedValue.isStoreTwoDirections()) | ||
| em.edgeConfig.next(((IntEncodedValueImpl) encodedValue).bits); |
There was a problem hiding this comment.
Ok... We need to do something about this. I think the cleanest way to handle this and other problems is not deserializing the encoded values from strings and then 'building' the encoding manager, but rather 'deserializing' the entire encoded manager. The edge and turn cost InitializerConfigs are just part of the encoding manager's state and need to be serialized as well. Deserializing the EM will then just mean reading everything and setting the entire state just the way it was stored, and not reading some parts of the state (the encoded values) and then determining the rest in the builder.
There was a problem hiding this comment.
I did exactly this now -> much better I think.
| String versionStr = properties.get("graph.em.version"); | ||
| if (versionStr.isEmpty() || !String.valueOf(Constants.VERSION_EM).equals(versionStr)) | ||
| throw new IllegalStateException("Incompatible encoding version. You need to use the same GraphHopper version you used to import the graph, or run a new import. " | ||
| + " Stored encoding version: " + (versionStr.isEmpty() ? "missing" : versionStr) + ", used encoding version: " + Constants.VERSION_EM); |
There was a problem hiding this comment.
We have this new Constants.VERSION_EM now that defines the version of the stored encoding manager. We do not need a 'version' for each encoded value separately I think, because we store all the different encoded values with all their properties.
| EncodedValue.InitializerConfig edgeConfig = EncodedValueSerializer.deserializeInitializerConfig(properties.get("graph.em.edge_config")); | ||
| EncodedValue.InitializerConfig turnCostConfig = EncodedValueSerializer.deserializeInitializerConfig(properties.get("graph.em.turn_cost_config")); | ||
| encodingManager = new EncodingManager(encodedValues, flagEncoders, edgeConfig, turnCostConfig); |
There was a problem hiding this comment.
I changed this now: We just store the init configs in the properties file and do not use the EM Builder at all anymore when deserializing the EM.
| static int staticHashCode(int... vals) { | ||
| if (vals == null) | ||
| return 0; |
There was a problem hiding this comment.
no need for these methods here anymore, but if you think they are generally useful we could move them into Helper or something?
There was a problem hiding this comment.
If not needed, please remove them :)
| @JsonProperty("minValue") int minValue, | ||
| @JsonProperty("maxValue") int maxValue, | ||
| @JsonProperty("negateReverseDirection") boolean negateReverseDirection, | ||
| @JsonProperty("storeTwoDirections") boolean storeTwoDirections | ||
| @JsonProperty("storeTwoDirections") boolean storeTwoDirections, |
There was a problem hiding this comment.
here is a minor problem regarding camelCase vs. under_score.
But maybe we do not need maxValue + minValue + negateReverseDirection? (negateReverseDirection would need a different meaning I guess but currently it won't work I fear)
There was a problem hiding this comment.
Ah yes, I just changed this to underscore.
There was a problem hiding this comment.
We already enforce (in IntEncodedImpl) that if negate reverse direction is used the min value must be zero (and store two directions must be false also).
* fix travis release for tagged commits; use jdk 17 instead of 11 for github releases * allow skipping the LM constraint check for A* (graphhopper#2544) * LM constraint should be ignored for A* * make it possible to skip checkLMConstraints call * move checkLMConstraints call to LMSolver. Fix createSolver for mixed preparations * avoid fundamental default change but throw proper exception when lm.disable parameter missing * Add names for travis build jobs (to be shown under 'Jobs and Stages on GitHub)' * Disable doclint explicitly * travis: only keep release build, related to graphhopper#2552 * Clean up javadoc comments (graphhopper#2569) * fix javadoc errors * remove javadoc plugin * make comment more readable * include javadoc again, revert unreadable comments * disable doclint for javadoc * Add flex alternatives to measurement * Do not remove SPT elements from the priority queue, speeds up flexible algorithms (graphhopper#2571) * Split flag encoders into encoded values and tag parsers (graphhopper#2561) * Remove final from VehicleEncodedValues * Log available country rules (graphhopper#2579) Co-authored-by: Thomas Butz <[email protected]> * Give access to vehicle tag parsers * Update bestFwd/BwdEntry for flexible algorithms when deleting SPT entries, fix graphhopper#2581 * Travis: Fix warnings in build config validation It said: Build config validation root: deprecated key sudo (The key `sudo` has no effect anymore.) root: missing os, using the default linux root: key matrix is an alias for jobs, using jobs * Add VehicleEncodedValues#isHGV * Use more recent node/npm versions to fix the build (graphhopper#2583) * Update readme for 5.3 * update deployment guide (graphhopper#2576) * update deployment guide * Update deploy.md * review comments * mention max_visited_nodes * Replace deprecated dropwizard parameter types (graphhopper#2574) Co-authored-by: Thomas Butz <[email protected]> * Use epsilon=0.9 for LM map-matching * Update changelog * Use edge keys consistently, store keys in CH shortcuts (graphhopper#2567) * Add comment about slow non-CH alternatives * Remove outdated/wrong comments * Add a mapmatching test * Remove 'shared' encoded values with $ sign in name (graphhopper#2585) * remove OSMAccessParser * removed $ from encoded values * no if clause necessary * fix changelog * downgrade todonow * Matrix client improvements (graphhopper#2587) * tmp * fix tests * update okhttp to 4.9.3 * fixes regarding code review Co-authored-by: easbar <[email protected]> * European toll fallback rules (graphhopper#2450) Co-authored-by: Thomas Butz <[email protected]> * use for loop in PathDetailsBuilderFactory as discussed in graphhopper#2585 (graphhopper#2589) * Fix: Put back block_private and block_fords for racingbike, this got lost in graphhopper#2561 * Make motor vehicle and hgv properties configurable for roads encoder (graphhopper#2594) * Disable edge+alt measurements, they take too long * Use separate deleted flag for SPTEntry, prevent exception when calculating routes with non-feasible approximator (graphhopper#2600) Also revert epsilon=0.9 'fix' in map matching now that we know what is going on * LMApproximator: Align variable names with equation numbers * Log map-matching took value in ms instead of seconds (graphhopper#2591) Co-authored-by: Andi <[email protected]> * rename StringIndex to EdgeKVStorage in preparation for graphhopper#2597 * windows does not need a separate documentation due to WSL (graphhopper#2599) * windows does not need a separate documentation due to WSL * link to install steps directly * EdgeKVStorage: store more than Strings (graphhopper#2597) * copied code and tests from byteindex branch * a bit more docu and tests * behaviour change: throw exception if string is too long and so cut string before storing way_name * renamed StringIndex -> EdgeKVStorage * more consistent: reject null values for all cases * include lost changes again * ensure same version of storage is used * changes from review * fix variable names for key handling * comments to javadoc * better 'compression' in case of identical map with byte[] array * throw exception earlier * Fix bug in non-CH AlternativeRoute (graphhopper#2603) * fix plateau-end check * Revert "Disable edge+alt measurements, they take too long" This reverts commit fb39266. * increase count to 10 for Measurement * AlternativeRoute: follow up refactoring, graphhopper#2603 * MiniGraphUI fixes to make it work again * move quickstart info into more prominent installation of README (graphhopper#2605) * Measurement: reduce routingCH_alt after it was accidentally raised in graphhopper#2603 * Remove GraphHopperStorage (graphhopper#2606) * Rename: GraphHopper#getGraphHopperStorage -> GraphHopper#getBaseGraph * Remove GraphHopperStorage * reduce benchmark load e.g. exclude too slow LM16 case * AlternativeRoute: closer to CH version; default is now a better compromise of speed vs. alternatives found (alternative rate is 1.8 for DE and 1.9 for bavaria) * Move/Rename: EncodingManager.Access -> WayAccess * AlternativeRoute: fix test * Clean up EncodingManager Builder * minor: Use Bike/FootNetwork.KEY * Rename freshFlags -> refreshFlags * BaseGraph: remove copying flags on write, see graphhopper#2593 * added elevation data to reduce internet-dependence while running test * Add comment about GraphHopper#init * Merged graphhopper#2593, i.e. revert b8d9b55 Co-authored-by: Andi <[email protected]> Co-authored-by: Thomas Butz <[email protected]> * Add another elevation file used in tests * Use access and speed EVs rather than flag encoder for GHUtility#setSpeed * Fix broken imports * More use access and speed EVs instead of encoder for GHUtility#setSpeed * Replace flag encoder with turn cost encoded value in turn cost provider * Remove FlagEncoder from ShortestWeighting and CustomWeighting * Find strongly-connected components of station (stop) graph (graphhopper#2608) * Load EncodingManager from properties instead of config (graphhopper#2607) * Helper.cutString should be only for KVStorage and reduce length to 250 to fix graphhopper#2609 * CHPreparationGraph bug fix: unsigned shift required (and increase limit for getKeyWithFlags graphhopper#2567) * make error message more clear * CHPreparationGraph: revert to previously correct signed shift * Increase maximum edge-based CH key for preparation to 2^30 again (graphhopper#2612) * Add test for large edge ID, graphhopper#2612 * custom_model: introduce value expression (graphhopper#2568) * value expression: findMax needs to be evaluated * less strict if * or + operator * refactored to findMinMax * made core tests pass * fix some more tests * fix more tests * add encoded values to initialization plus tests * check minimum for custom_model of query * improve on check of minimum and negative factors * less overhead for constant values * use Double.parse instead of ExpressionEvaluator if number to significantly improve speed * minor cosmetics * clarify LATER and removed TODO NOW * adapted docs * minor optimization and cleanup * fix FindMinMax.checkLMConstraints call * do not allow / as operation * reduce power and complexity of right hand side a bit more and allow only a single EncodedValue for now * better readable via extra MinMax class instead of double[] * exclude changes from master * a bit more comments * Create weighting after graph in two tests * Update custom model editor: operator values are strings now * Update custom model editor: validation + auto-complete for rhs expressions (graphhopper#2615) * Allow graph.encoded_values for which there is no tag parser * Use actual speed maximum rather than flagEncoder#getMaxSpeed() for weighting.getMinWeight() (graphhopper#2614) * Rename getMin/MaxInt -> getMin/MaxStorableInt, getMaxSetValueOrMax -> getMaxOrMaxStorable (graphhopper#2616) * Remove FlagEncoder#getMaxSpeed() (graphhopper#2619) * Remove car/bike_access evs from DefaultEncodedValueFactory, was added only for graphhopper#2523 * CustomModelParser: no need for max speed * EdgeKVStorage: store name and ref tags separately (graphhopper#2598) * copied code and tests from byteindex branch * a bit more docu and tests * behaviour change: throw exception if string is too long and so cut string before storing way_name * renamed StringIndex -> EdgeKVStorage * store name and ref tags separately; create separate path detail for ref; use ref as fallback in instruction text * added text to changelog * minor comment changes * review: fix comments * review comments and add getValue method to avoid creating HashMaps * try if speed up was really from the change getKeyValues->edge.getValue * Revert "try if speed up was really from the change getKeyValues->edge.getValue" This reverts commit 58a34d6. Co-authored-by: easbar <[email protected]> * update i18n * Remove FlagEncoder (graphhopper#2611) * EdgeKVStorage: remove smallCache as too much complexity. we accept disk usage increases by 12% and more uniq keys later possible * Move outdoor vehicles list * Relax speed EV requirement for EncodingManager#getVehicles * Check vehicle instead of access/speed in checkProfilesConsistency * reduce distance when average_speed path details can be missing, fixes graphhopper#2620 * Valid if PathDetail is null (graphhopper#2618) * Valid if object is null * Adding my name in contributors * Adjusting indentation * Update CONTRIBUTORS.md Co-authored-by: Rafael Telles <[email protected]> Co-authored-by: Peter <[email protected]> * Support for forward & backward key value pairs (graphhopper#2622) * fix test * minor update to docs for map matching * Update README.md * add more info to exception * profiles.md: updated rhs to strings * minor test change to avoid downloading elevation tile * CustomModelParser: minor cleanup * EncodedValue: bug fix for negateReverseDirection * ConditionalExpressionVisitor: allow '-' as unary operation * fixed link to CGIAR attribution * make global time&distance values consistent with path details and instructions (graphhopper#2626) * make global time&distance values consistent with time&distance path details and also the sum of time&distance of the instructions * minor simplification * mention change in changelog * minor comment fix for graphhopper#2626 * Update github actions v2->v3 * Include destination in instructions (graphhopper#2624) * support for destination and add test for non repetitive instructions when destination is included * include destination:ref * add missing osm file * try getKeyValues instead getValue * try speed of getKeyValues (fetching REVERSE_STATE necessary as getKeyValues is align with 'internal' storage direction) * use simpler edge.getValue call again * Make profile resolving more flexible for web API (graphhopper#2629) * ProfileResolver only resolves name of the profile (graphhopper#2629) * car: do not pass jersey_barrier https://www.openstreetmap.org/node/8857224952 * move cut string method to EdgeKVStorage * EdgeKVStorage: no need for cacheSize parameter anymore * Examples: remove incorrect comment * fix PathDetails e.g. -1 as default for DecimalDetails doesn't work as a value of the EV could be negative too * renamed DouglasPeucker to RamerDouglasPeucker * client-hc: add examples to get translated ("raw") turn instructions * HeightTile: minor correction, DecimalEncodedValueImpl: minor clarification * EdgeKVStorage: allow 32 bits (graphhopper#2632) * allow 32 bits instead of just 31 for EdgeKVStorage * remove incorrect exception * minor change to wayGeo limit check * Maps: Hide gpx export button when custom model box is open, fix graphhopper#2635 * Add hint about custom_model_file vs. custom_model to exception error message (graphhopper#2638) * Add comma in routing logs * Move code that creates EncodingManager from properties to EncodingManager * Return boolean result from BaseGraph#loadExisting * Move code that puts EncodingManager into properties to EncodingManager * add hgt provider * AbstractTiffElevationProvider: use correct long cast * pt: hint on how to use multiple files * Add BaseGraph#debugPrint * new edge smoothing: "ramer" (graphhopper#2634) * initial version of new edge smoothing * improve comments * let's switch the order: first do sampling, then smoothing * use moving_average as name and a few more comments * use same max_elevation like in example config * fix moving_average * again moving_average rename * New average_slope EV (graphhopper#2645) * initial version of new edge smoothing * improve comments * let's switch the order: first do sampling, then smoothing * encoded values for elevation-aware routing: average_slope and max_slope * for tunnels and bridges ignore elevation changes for pillar nodes * SlopeSetter -> SlopeCalculator * fix link for GTFS demo file for graphhopper#2639 * removed defaultIsInfinity and fix bug in DecimalEncodedValueImpl (graphhopper#2646) * removed defaultIsInfinity and fix bug in DecimalEncodedValueImpl * changelog: fix issue number * for useMaximumAsInfinity: also throw an exception if value is too big, but not for infinity * fix merge of master * Revert "for useMaximumAsInfinity: also throw an exception if value is too big, but not for infinity" This reverts commit e3d8826. * print warning if max_width, max_weight etc values are too large * fix link for GTFS demo file for graphhopper#2639 * Revert "fix link for GTFS demo file for graphhopper#2639" This reverts commit d9bb4b9. * NOTICE: updated dependencies and copyright * make ramer edge smoothing more robust, graphhopper#2634 * TurnCostParser: no need for method createTurnCostEncodedValues * improvements for bike (graphhopper#2631) * lower speed for bad smoothness and steps; avoid hazmat; faster if paving_stones * clean up of smoothness handling * revert to 4kmh pushing section speed and tweak speed for certain surfaces * mtb+racing: do not overwrite highway and surface speed if identical in subclass * consider multiple from members for no_entry (graphhopper#2648) * allow configuring turn costs and TransportationMode for RoadsTagParser, related to graphhopper#2460 * add hgv enum to make truck access configurable * add test for hgv encoded value * for now do not log as too many warnings, graphhopper#2646 * SlopeCalculator: skip calculation if PointList is empty or 2D only * Do not get elevations for nodes we don't need while parsing OSM * Custom weighting calcEdgeMillis truncate instead of round * just for consistency and easier migration with/from FastestWeighting * CustomWeighting: handle special case for barrier edges with distance==0 and average_speed>0 * Maps: Add slope detail to elevation diagram (graphhopper#2654) * Custom and fastest weighting calcEdgeMillis round instead of truncate * otherwise they are not always the same, because one multiplies by 3600 and the other by 3.6*1000 ... * Fix pt tests * Disable flaky test * custom and fastest calcEdgeMillis again: make them actually the same * Validate that osm ids are not negative (graphhopper#2652) * Add comment about negative osm ids, code formatting * OSMParsers: don't accept null TagParser * replace car4wd with roads and a custom_model (graphhopper#2651) * Revert "OSMParsers: don't accept null TagParser" This reverts commit 8f5c7b2. * Add urban density encoded value to identify built-up areas (graphhopper#2637) * Rename Development -> UrbanDensity (graphhopper#2637) * Support ";" access delimiter for car access. (graphhopper#2655) * Support ";" access delimiter for car access. One example is motor_vehicle = agricultural;forestry * Add support for ";" access delimiter for MotorcycleTagParser and road_access EV. * Move logic for access delimiter handling for ";" from RoadAccess into OSMRoadAccessParser * Fix for OSMRoadAccessParserTest * map match without graphhopper class (graphhopper#2657) * Solve Viterbi problem with Dijkstra to calculate fewer routes * Solve Viterbi problem with Dijkstra to calculate fewer routes * use 6.x/6.0 in readme * announcement * fix critical bug in client-hc for Matrix API * SBI Algo Co-authored-by: Peter <[email protected]> Co-authored-by: easbar <[email protected]> Co-authored-by: otbutz <[email protected]> Co-authored-by: Thomas Butz <[email protected]> Co-authored-by: Michael Zilske <[email protected]> Co-authored-by: Robin <[email protected]> Co-authored-by: Andi <[email protected]> Co-authored-by: Rafael Sanches Telles <[email protected]> Co-authored-by: Rafael Telles <[email protected]> Co-authored-by: Alexey Abel <[email protected]> Co-authored-by: Lukas Weber <[email protected]> Co-authored-by: ratrun <[email protected]>
So far we use the config file to create the encoding manager, whether we run a new import or load an existing graph. This means we have to use the exact same configuration when loading a graph that we used for the import, even though we cannot change the encoding manager after the first import anyway. A more comfortable approach would be loading the encoding manager from the stored data and not having to use the same configuration again.
Another problem with the current approach is that we'd like to store the maximum speeds used during the import so we can use them for the A* heuristics later. So far these values were taken from the config (or the hard-coded defaults). We can store the max values in the encoded values and write them to the properties file (or elsewhere), but then of course we need to read them later when loading the graph.
Starting with this PR all encoded values, flag encoders (and the encoding manager) are created from a string representation in the properties file when we load the graph. This allows storing the maximum speeds/values along with the encoded value properties.