Iceland: map_cover_13_is has 1 invalid geometry (an estuary, ring self-intersection) #120

Closed
opened 2026-08-15 07:19:16 +00:00 by art · 1 comment
Owner

Writing the first acceptance tests for #115 found this: Iceland's map_cover_13_is contains 1 invalid geometry — an estuary polygon (1.94 km², CLC 522) off the west coast at 64.31°N / 14.93°W with a ring self-intersection at [-1660395.8, 9433392.7] (3857).

  • ST_IsValidReason: Ring Self-intersection
  • Stable: rechecked, same row every time (not the borderline ST_IsValid nondeterminism #14's carve documented).
  • Does not propagate: z12 and below are clean (0 invalid) — the cascade's rollup/absorption happens to repair or drop it, so only the maxz table carries it.

The row is exactly what a per-country acceptance test ("0 invalid geometries at maxz") is for; the test is deliberately not shipped in #119 because it would fail against the current live data. This issue tracks the fix.

Likely fixes, in the project's idiom: ST_MakeValid the source row in the ismap cover query (R139's extraction pattern: ST_CollectionExtract(..., 3) after the union), or verify whether the CLC source polygon is invalid as delivered (LMÍ publishes CORINE codes verbatim — check the gpkg before repairing). A reimport of Iceland's cover is the cheap kind (17.6k rows at z13); the expensive step is nothing here.

The acceptance test that catches it can land in the same change.

Writing the first acceptance tests for #115 found this: Iceland's `map_cover_13_is` contains **1 invalid geometry** — an `estuary` polygon (1.94 km², CLC 522) off the west coast at 64.31°N / 14.93°W with a ring self-intersection at [-1660395.8, 9433392.7] (3857). - `ST_IsValidReason`: `Ring Self-intersection` - Stable: rechecked, same row every time (not the borderline ST_IsValid nondeterminism #14's carve documented). - Does not propagate: z12 and below are clean (0 invalid) — the cascade's rollup/absorption happens to repair or drop it, so only the maxz table carries it. The row is exactly what a per-country acceptance test ("0 invalid geometries at maxz") is for; the test is deliberately **not** shipped in #119 because it would fail against the current live data. This issue tracks the fix. Likely fixes, in the project's idiom: `ST_MakeValid` the source row in the ismap cover query (R139's extraction pattern: `ST_CollectionExtract(..., 3)` after the union), or verify whether the CLC source polygon is invalid as delivered (LMÍ publishes CORINE codes verbatim — check the gpkg before repairing). A reimport of Iceland's cover is the cheap kind (17.6k rows at z13); the expensive step is nothing here. The acceptance test that catches it can land in the same change.
Author
Owner

Result is in #131 — #131; the review note is the PR description.

Result is in #131 — https://git.blahonga.org/art/ismap/pulls/131; the review note is the PR description.
art closed this issue 2026-08-15 19:16:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
art/ismap#120
No description provided.