-
Notifications
You must be signed in to change notification settings - Fork 456
refactor: transfer hgv storage to encoded values #2146
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
Conversation
e6377df to
d0b07b1
Compare
41ac1c9 to
ae3731e
Compare
ae3731e to
5756248
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors heavy vehicle storage from a custom HeavyVehicleAttributesGraphStorage to GraphHopper's encoded values system. The refactoring moves vehicle access restrictions and dimension limits from a graph extension into the core encoding system using boolean and decimal encoded values.
Key Changes
- Replaced
HeavyVehicleAttributesGraphStoragewith encoded values for vehicle access (7 types) and dimension restrictions (5 types) - Introduced
VehicleAccessParserandHazmatAccessParserto handle OSM tag parsing - Updated edge filters to query encoded values instead of graph storage
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| GraphStorageBuilder service file | Removed registration of HeavyVehicleGraphStorageBuilder |
| VehicleParameters.java | Refactored to use Lombok annotations and added helper methods to check if parameters are set |
| VehicleAccessParser.java | New parser for handling vehicle-specific access restrictions from OSM tags |
| HazmatAccessParser.java | New parser for handling hazardous material restrictions |
| HeavyVehicleGraphStorageBuilder.java | Deleted - functionality moved to parsers |
| HeavyVehicleAttributesGraphStorage.java | Deleted - replaced by encoded values |
| HeavyVehicleCoreEdgeFilter.java | Updated to use encoded values with inverted logic bug and static field issue |
| HeavyVehicleEdgeFilter.java | Updated to use encoded values with wrong key check bug |
| VehicleDimensionRestrictions.java | Deleted - constants no longer needed |
| OrsTagParserFactory.java | Registered new parsers for vehicle access types |
| ORSGraphHopper.java | Simplified to use new edge filter constructor |
| PluginManager.java | Added "HeavyVehicle" to list of storages transferred to encoded values |
| EncodedValuesProperties.java | Added properties for 12 new encoded values and refactored methods |
| BuildProperties.java | Added handlers to initialize vehicle access and restriction encoded values |
| Access encoded value classes | Seven new classes for different vehicle access types (agricultural, bus, delivery, forestry, goods, hgv, hazmat) |
| CHANGELOG.md | Added entry for this refactoring |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...g/heigit/ors/routing/graphhopper/extensions/edgefilters/core/HeavyVehicleCoreEdgeFilter.java
Outdated
Show resolved
Hide resolved
...g/heigit/ors/routing/graphhopper/extensions/edgefilters/core/HeavyVehicleCoreEdgeFilter.java
Outdated
Show resolved
Hide resolved
...n/java/org/heigit/ors/routing/graphhopper/extensions/edgefilters/HeavyVehicleEdgeFilter.java
Outdated
Show resolved
Hide resolved
7457a19 to
66b1d00
Compare
…es (#111) The change is necessary in order to match the original ORS behavior after the transition from extended storage to encoded values introduced by GIScience/openrouteservice#2146.
… of maintainability
…`MaxAxleLoad.KEY` Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…filter The boolean access encoded values represent whether access is allowed (true = allowed, false = blocked). Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
7fc6de2 to
e9eaafe
Compare
|
sfendrich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!



Pull Request Checklist
have been resolved.
[Unreleased] heading.
along with a short description of what it is for, and documented this in the Pull Request (below).
(at least Germany), and the graphs build without problems (i.e. no out-of-memory errors).
importer etc.), I have generated longer distance routes for the affected profiles with different options
(avoid features, max weight etc.) and compared these with the routes of the same parameters and start/end
points generated from the current live ORS.
If there are differences then the reasoning for these MUST be documented in the pull request.
and why the change was needed.
Fixes # .
Information about the changes
Examples and reasons for differences between live ORS routes, and those generated from this pull request
Required changes to ors config (if applicable)