Skip to content

Fix check for OSM relation members not being present in the extract - #5379

Merged
leonardehrenfried merged 5 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:fix-invalid-relation-references
Oct 10, 2023
Merged

Fix check for OSM relation members not being present in the extract#5379
leonardehrenfried merged 5 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:fix-invalid-relation-references

Conversation

@leonardehrenfried

@leonardehrenfried leonardehrenfried commented Sep 27, 2023

Copy link
Copy Markdown
Member

Summary

This fixes #5378.

The problem was that an OSM extract where relations refer to a way that isn't in that extract. We want to deal with it gracefully because compatibility with Geofabrik extracts is an important feature.

The thing is there was already a check if the way exists but it was looking at the wrong collection.

cc @atrawog

Issue

Fixes #5378

Unit tests

Added.

@leonardehrenfried leonardehrenfried added the !Bug Apply to issues describing a bug and PRs witch fixes it. label Sep 27, 2023
@leonardehrenfried
leonardehrenfried requested a review from a team as a code owner September 27, 2023 15:54
@codecov

codecov Bot commented Sep 27, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (fb35a61) 66.57% compared to head (d6c9bf9) 66.56%.
Report is 1 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5379      +/-   ##
=============================================
- Coverage      66.57%   66.56%   -0.01%     
  Complexity     15273    15273              
=============================================
  Files           1790     1790              
  Lines          69367    69371       +4     
  Branches        7306     7307       +1     
=============================================
- Hits           46181    46178       -3     
- Misses         20710    20715       +5     
- Partials        2476     2478       +2     
Files Coverage Δ
...pplanner/graph_builder/module/osm/OsmDatabase.java 77.97% <20.00%> (-0.64%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardehrenfried leonardehrenfried changed the title Fix check for invalid relation references Fix check for relation members not being present in the extract Sep 28, 2023
@vesameskanen
vesameskanen self-requested a review September 28, 2023 11:53
@t2gran t2gran added this to the 2.5 (next release) milestone Sep 28, 2023
vesameskanen
vesameskanen previously approved these changes Sep 28, 2023
@leonardehrenfried leonardehrenfried changed the title Fix check for relation members not being present in the extract Fix check for OSM relation members not being present in the extract Sep 29, 2023
Comment thread src/test/java/org/opentripplanner/graph_builder/module/osm/OsmDatabaseTest.java Outdated
Comment thread src/test/java/org/opentripplanner/graph_builder/module/osm/OsmDatabaseTest.java Outdated
Comment thread src/test/java/org/opentripplanner/graph_builder/module/osm/OsmDatabaseTest.java Outdated
@leonardehrenfried
leonardehrenfried merged commit 00c0304 into opentripplanner:dev-2.x Oct 10, 2023
t2gran pushed a commit that referenced this pull request Oct 10, 2023
@leonardehrenfried
leonardehrenfried deleted the fix-invalid-relation-references branch October 10, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Processing austria-latest.osm.pbf fails with NullPointerException

4 participants