FAILURE MAP
← Case archive

FA-70574 / GIS polygon topology / Member archive

Grid snapping with ring collapse handling: snapped duplicate merge · case 04

Snapped rings contain zero-length edges and collapsed rings survive.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression #10[[[0, 0], [3, 0], [3, 0], [3, 3], [0, 3], [0, 0]]][[[0, 0], [3, 0], [3, 3], [0, 3], [0, 0]]]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 ↗