FAILURE MAP
← Case archive

FA-70577 / GIS polygon topology / Member archive

Grid snapping with ring collapse handling: collapse threshold · case 02

Rings collapsed to a doubled segment are kept.

Member previewVariant 2 · 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
boundary #20[[[0, 0], [9, 0], [9, 9], [0, 9], [0, 0]], [[3, 3], [5, 3], [3, 3]]][[[0, 0], [9, 0], [9, 9], [0, 9], [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 ↗