FA-70472 / GIS polygon topology / Member archive
TopoJSON arc stitching into rings: reversal application · case 02
Rings that use an arc backwards jump across the shape.
Case contract
Input [arcs, transform, ring]. Each arc is a list of quantized delta positions (the first is absolute, later ones add to the running position within that arc). transform [sx, sy, tx, ty] maps q to q*s + t per axis; a null transform is the identity [1, 1, 0, 0]. A ring lists arc indexes; a negative index i means arc ~i (bitwise complement) traversed backwards. Arcs after the first contribute all but their first position, which duplicates the previous arc end. Return the stitched list of [x, y].
Why this case matters
Shared-boundary topology formats store each border once; decoding errors break rings, reverse borders or duplicate junction vertices.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control #3 | [[105.0, 202.5], [107.5, 202.5], [107.5, 200.0], [105.0, 200.0], [105.0, 200.0], [105.0, 202.5]] | [[105.0, 202.5], [107.5, 202.5], [107.5, 200.0], [105.0, 200.0], [105.0, 200.0], [100.0, 200.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 ↗