FAILURE MAP
← Case archive

FA-70682 / GIS polygon topology / Member archive

Shapefile part rings assembled into polygons: smallest containing exterior · case 02

Holes in islands inside lakes are attached to the outer mainland ring.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input: a list of closed integer rings from one shapefile record. Clockwise rings (negative shoelace sum) are exteriors, counter-clockwise rings are holes, zero-area rings are ignored. Each hole joins the SMALLEST-area exterior whose interior contains the hole first vertex (crossing-number test). A hole contained by no exterior is promoted to an exterior of its own. Return [[exterior_index, sorted hole indexes], ...] sorted by exterior index.

Why this case matters

Shapefile readers must rebuild polygon structure from flat part lists; islands in lakes and orphan holes are the classic failure cases.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression #11[[0, [2]], [1, []]][[0, []], [1, [2]]]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 ↗