Add grid test 769: inner ring touching outer at two points, splitting it into two components - #11
Open
brawer wants to merge 1 commit into
Conversation
An inner ring that touches the outer at exactly two points (not along an overlapping edge, not crossing), so removing it splits the outer into two disjoint polygons rather than leaving one polygon with a hole. grid has single-point (7/754-7/758) and shared-line (7/756, 7/757) inner/outer touches, and a single self-touching way resolving into two components (7/765, 7/766), but not this two-separate-rings, two-point-touch case. data/all.osm, data/tests.json, and grid.db regenerated via `make data` and `make grid`.
This was referenced Aug 12, 2026
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.
gridhas fixtures for an inner ring touching the outer at a single point (7/754-7/758) and touching along a shared line (7/756,7/757), and for a single self-touching way resolving into two components (7/765,7/766). It doesn't seem to have a case for two separate simple rings — one outer, one inner — where the inner ring touches the outer at exactly two points, so removing it splits the outer's boundary into two disjoint polygons rather than leaving one polygon with a hole. Test 769 (a free ID in the mp-geom bounding box (7.9 1.6, 8.0 1.7)) adds that case.This mirrors
geometry_multipolygon/8from nimix/osm_conv_tests, a 2012, unlicensed predecessor test suite for the same kind of OSM-to-GIS geometry conversion. We came across it while investigating a geometry bug of our own and wondered whether it had anythinggriddoesn't; as far as we could tell, this two-point-touch case was the only thing it covered thatgriddidn't already have. We asked about the relationship between the two repos in nimix/osm_conv_tests#2 — linking it here too since that's the same @joto who'll see this PR.Both member ways are untagged, matching the plain/no-frills style of nearby fixtures like 706.
data.osm/test.json/result/nodes.wkt/ways.wktfollow the existing 7xx ID/coordinate conventions fromgrid/README.md(nodes 769000-769007, ways 769800/769801, relation 769900; bounding box derived from the test number). The expected WKT was verified against georust/geo'sBooleanOps-based even-odd containment resolution, not hand-derived.data/all.osm,data/tests.json, andgrid.dbregenerated viamake dataandmake grid.This PR (including the test-case design and the analysis above) was generated by Claude Code, sent on behalf of @brawer.