FA-70575 / GIS polygon topology / Member archive
Grid snapping with ring collapse handling: snapped duplicate merge · case 05
Snapped rings contain zero-length edges and collapsed rings survive.
Case contract
Input [rings, g]: polygon rings (exterior first), closed, numeric coordinates; grid size g > 0 anchored at 0. Each coordinate snaps to floor(v/g + 0.5)*g (halves round toward +infinity). Consecutive identical snapped positions are merged. A ring left with fewer than 4 positions has collapsed: if it is the exterior return None, otherwise drop that hole. Return the snapped rings.
Why this case matters
Precision reduction for storage, tiling and topology cleaning snaps vertices to a grid; collapse rules decide whether tiny holes vanish or the polygon is discarded.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary #17 | [[[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]] | null | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗