FAILURE MAP
← Case archive

FA-70714 / GIS polygon topology / Member archive

WKT polygon and multipolygon ring structure: multipolygon nesting · case 04

Multipolygons are read as one polygon whose rings are polygons.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input: a WKT string. The keyword (case-insensitive) must be POLYGON or MULTIPOLYGON, else None; "<keyword> EMPTY" returns []. Otherwise parse the parenthesised body into polygons -> rings -> positions, keeping only x and y of every position (Z/M ordinates are dropped). Every ring must have at least 4 positions and be closed in x/y, else None. Return a list of polygons (a POLYGON gives a one-element list).

Why this case matters

WKT is the lingua franca between databases and GIS tools; losing a dimension or nesting level corrupts rings.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression #9null[[[[-1.5, -2.0], [300.0, 0.0], [0.0, 10.0], [-1.5, -2.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 ↗