Skip to content

Conversation

@aoles
Copy link
Member

@aoles aoles commented Oct 1, 2025

Pull Request Checklist

  • 1. I have rebased the latest version of the main branch into my feature branch and all conflicts
    have been resolved.
  • 2. I have added information about the change/addition to functionality to the CHANGELOG.md file under the
    [Unreleased] heading.
  • 3. I have documented my code using JDocs tags.
  • 4. I have removed unnecessary commented out code, imports and System.out.println statements.
  • 5. I have written JUnit tests for any new methods/classes and ensured that they pass.
  • 6. I have created API tests for any new functionality exposed to the API.
  • 7. If changes/additions are made to the ors-config.json file, I have added these to the ors config documentation
    along with a short description of what it is for, and documented this in the Pull Request (below).
  • 8. I have built graphs with my code of the Heidelberg.osm.gz file and run the api-tests with all test passing
  • 9. I have referenced the Issue Number in the Pull Request (if the changes were from an issue).
  • 10. For new features or changes involving building of graphs, I have tested on a larger dataset
    (at least Germany), and the graphs build without problems (i.e. no out-of-memory errors).
  • 11. For new features or changes involving the graphbuilding process (i.e. changing encoders, updating the
    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.
  • 12. I have written in the Pull Request information about the changes made including their intended usage
    and why the change was needed.
  • 13. For changes touching the API documentation, I have tested that the API playground renders correctly.

Fixes # .

Information about the changes

  • Key functionality added:
  • Reason for change:

Examples and reasons for differences between live ORS routes, and those generated from this pull request

Required changes to ors config (if applicable)

@aoles aoles force-pushed the refactor/transfer_hgv_storage_to_encoded_values branch 4 times, most recently from e6377df to d0b07b1 Compare October 2, 2025 21:25
@aoles aoles force-pushed the refactor/transfer_hgv_storage_to_encoded_values branch 2 times, most recently from 41ac1c9 to ae3731e Compare October 24, 2025 18:56
@aoles aoles self-assigned this Nov 18, 2025
@aoles aoles force-pushed the refactor/transfer_hgv_storage_to_encoded_values branch from ae3731e to 5756248 Compare November 25, 2025 09:01
@aoles aoles requested a review from Copilot November 25, 2025 09:09
Copy link
Contributor

Copilot AI left a 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 HeavyVehicleAttributesGraphStorage with encoded values for vehicle access (7 types) and dimension restrictions (5 types)
  • Introduced VehicleAccessParser and HazmatAccessParser to 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.

@aoles aoles force-pushed the refactor/transfer_hgv_storage_to_encoded_values branch from 7457a19 to 66b1d00 Compare November 26, 2025 13:46
aoles added a commit to GIScience/graphhopper that referenced this pull request Nov 28, 2025
…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.
@aoles aoles marked this pull request as ready for review November 28, 2025 09:16
@aoles aoles force-pushed the refactor/transfer_hgv_storage_to_encoded_values branch from 7fc6de2 to e9eaafe Compare December 3, 2025 01:05
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2025

Copy link
Contributor

@sfendrich sfendrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@aoles aoles changed the title refactor: transfer hgv storage to encoded values (WIP) refactor: transfer hgv storage to encoded values Dec 3, 2025
@github-actions github-actions bot added refactor and removed refactor labels Dec 3, 2025
@aoles aoles enabled auto-merge December 3, 2025 20:37
@aoles aoles merged commit d7f81ed into main Dec 3, 2025
42 checks passed
@aoles aoles deleted the refactor/transfer_hgv_storage_to_encoded_values branch December 3, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants