FA-70764 / GIS polygon topology / Member archive
Snapping ring vertices to a reference layer: nearest candidate · case 04
Vertices snap to the first reference vertex in range rather than the closest one.
Case contract
Input [ring, ref, tol]: a closed ring, reference vertices and a tolerance. Each ring vertex moves to the NEAREST reference vertex within Euclidean distance tol (inclusive; ties go to the lowest reference index), otherwise stays. Consecutive identical snapped vertices merge. If the result has fewer than 4 positions or is not closed return None, else return it.
Why this case matters
Integrating new survey data with an authoritative layer snaps nearby vertices so shared boundaries become identical; snapping to the wrong vertex creates slivers.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression #2 | [[5, 5], [8, 2], [9, 9], [5, 5]] | [[5, 6], [8, 2], [9, 9], [5, 6]] | 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 ↗