Fix single nested relations issue in RawAtlasGenerator #212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
In case a relation (A) has a single member and that member is a point that is exactly duplicated by another point, and that relation's (A) point is the one marked for "duplicate removal" by the
RawAtlasGenerator
, thePackedAtlasBuilder
would throw anAtlasIntegrityException
complaining that referencing the relation (A) (which is removed) as a member of relation (B) was illegal. This PR keeps track of this case by making sure relation (A) is also removed as a member from relation (B).Potential Impact:
No
AtlasIntegrityException
in that use case.Unit Test Approach:
Created a fake PBF file with 2 overlapping nodes, both only members single relations which are only members of another relation each. Checking that the resulting RawAtlas contains only 2 relations and not 4, and that no
AtlasIntegrityException
is thrown.Also added
.osm
file for reference.Test Results:
There are only two relations, and no
AtlasIntegrityException
is thrown.In doubt: Contributing Guidelines