FAILURE MAP
← Case archive

FA-70608 / GIS polygon topology / Member archive

Douglas-Peucker simplification of a topology arc: first maximum tie-break · case 03

Among equally distant vertices the last one is kept, changing the simplified shape.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input [points, tol]: an arc as integer [x, y] positions (possibly closed, first == last). Keep both endpoints; recursively (explicit stack) find the interior vertex farthest from the SEGMENT between the current endpoints (projection clamped to the segment; distance to the point itself if the endpoints coincide), taking the first maximum; keep it and split when that distance is strictly greater than tol. Return kept positions in order.

Why this case matters

Shared arcs are simplified once so adjacent polygons stay gap-free; distance and split errors change which boundary vertices survive.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
control #8[[0, -4], [3, -4], [6, 1], [12, 3], [15, -4]][[0, -4], [3, -4], [9, 3], [12, 3], [15, -4]]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 ↗