Skip to content
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

fix(map-matching): Fix broken map matching for here traffic data #1430

Merged
merged 10 commits into from
May 25, 2023

Conversation

aoles
Copy link
Member

@aoles aoles commented May 4, 2023

Pull Request Checklist

  • 1. I have rebased the latest version of the master 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.

Information about the changes

Addresses the problem of traffic data not being matched to the graph which has been discovered when working on #1403.

@aoles aoles changed the title Fix/traffic map matching fix: map matching for traffic data May 10, 2023
@aoles aoles marked this pull request as ready for review May 10, 2023 11:31
@MichaelsJP
Copy link
Member

@aoles Is this PR ready?

@aoles
Copy link
Member Author

aoles commented May 10, 2023

@MichaelsJP Yes, otherwise I wouldn't mark it as such.

@MichaelsJP
Copy link
Member

@aoles Are you sure proceeding without having at least basic unit tests for hmm module?

@aoles
Copy link
Member Author

aoles commented May 12, 2023

Thanks @MichaelsJP! This is just a spin-off from #1403 meant to address some fundamental problems. Its main purpose is to restore some basic functionality around map patching in order to enable the implementation of API tests for routing with traffic. In fact, it is not even meant to be a complete solution to all of the problems, see e.g. #1434. Therefore, I believe any additional tests are beyond the scope of this PR.

To summarize, I'm quite positive about merging the PR. Proper evaluation of the correctness of the HMM module will happen in #1435, and any potential unit tests should probably be added there.

@MichaelsJP MichaelsJP force-pushed the fix/traffic_map_matching branch from b8feaac to 3f19bcd Compare May 13, 2023 14:42
@MichaelsJP MichaelsJP changed the title fix: map matching for traffic data fix(map-matching): Fix broken map matching for here traffic data May 13, 2023
@github-actions github-actions bot added fix and removed fix labels May 13, 2023
@MichaelsJP MichaelsJP requested a review from takb May 13, 2023 14:57
@MichaelsJP MichaelsJP enabled auto-merge May 15, 2023 10:49
@MichaelsJP MichaelsJP force-pushed the fix/traffic_map_matching branch from 3f19bcd to 52370f8 Compare May 19, 2023 07:10
aoles added 9 commits May 23, 2023 10:51
Match to the ordering in `Coordinate` objects for proper distance calculation.
Circumvent issue of obtaining `Path` edges by calling the routing algorithm directly rather than creating a `GHRequest`.
Modifing the hash map inside of the loop seems to mess up the original loop iterator.
…object fields.

There is no need of duplicating fields contained in the `Snap` instance which a `MatchPoint` holds.
@MichaelsJP MichaelsJP force-pushed the fix/traffic_map_matching branch from 52370f8 to 2903714 Compare May 23, 2023 08:51
@MichaelsJP
Copy link
Member

@aoles Please give a short heads-up on the status of this and what still needs to be done. Thanks ❤️

@aoles
Copy link
Member Author

aoles commented May 25, 2023

@MichaelsJP It's ready to be reviewed and merged since about two weeks now :) The API tests for #1403 were not meant to be part of this PR and will be implemented in a separate PR.

@MichaelsJP MichaelsJP disabled auto-merge May 25, 2023 10:49
@MichaelsJP MichaelsJP enabled auto-merge May 25, 2023 10:50
@MichaelsJP MichaelsJP disabled auto-merge May 25, 2023 10:50
@MichaelsJP MichaelsJP enabled auto-merge May 25, 2023 10:50
@MichaelsJP MichaelsJP merged commit 0a10f66 into master May 25, 2023
@MichaelsJP MichaelsJP deleted the fix/traffic_map_matching branch May 25, 2023 10:53
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.

3 participants