Bugfix/54 issue with inner outer holes sequence#55
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixed issue #54 where OSM relations with non-consecutive
role ordering would incorrectly generate multiple outer
polygons instead of a single connected boundary.
Problem: When an OSM multipolygon relation had members
ordered as outer-outer-inner-outer (with outer ways split by
inner ways), the consecutive grouping logic would create
separate outer groups, resulting in fragmented polygons.
Solution: When multiple outer groups exist after consecutive
grouping, the fix attempts to merge all outer lines
together. The merged result is only used if it creates
exactly 1 polygon (indicating the segments actually
connect). This preserves correct behavior for complex cases
like Baarle-Nassau (issue #35) where separate outer groups
are intentional.
Type of Change
Related Issues
Fixes #54
Changes Made
and merge disconnected outer groups when they form a single
connected polygon
with real-world OSM data (relation 195444 - Staffordshire
county boundary)
and maintains backward compatibility
Testing
Manual Testing Steps:
Checklist
ruff formatandruff check)Screenshots (if applicable)
Additional Notes