Denmark pilot: INSPIRE administrativeunit mask + CORINE cover #218

Open
opened 2026-08-24 17:05:13 +00:00 by art-bot · 0 comments
Collaborator

Gated on #211 (the catalogue). Mask plus cover for Denmark, both from the anonymous
Klimadatastyrelsen INSPIRE route — no token needed for the pilot.

  • Mask: https://api.dataforsyningen.dk/ogcapi/features/au_inspire/collections/administrativeunit/items
    → 105 units; filter nationallevel = 1stOrder for the country polygon
    (name_gn_spell_spellofna_text = "Danmark", nationalcode = DK). Verified live,
    anonymous, CC BY 4.0. This is also the clean answer to the Greenland/Faroes scope
    question — they are separate country codes, not Danish administrative units in this
    dataset, so no filtering hack is needed. Say that in the config comment so a later reader
    does not go looking.
  • Cover: CORINE CLC 2018 via the existing clms: provider, identity mapping (R116),
    NUTS0 DK. Denmark's own lc_inspire/landcoverunit (576 118 polygons, anonymous,
    CC BY 4.0) is far finer, but its classification is a URI scheme into the Danish
    grunddatamodel
    that must be enumerated and argued class by class in the
    conf/se/conf/pl style — that is the later upgrade, not the pilot.

Denmark-specific

  • CRS is normally EPSG:25832; the OGC API returns GeoJSON in EPSG:4326. Check what
    arrives.
  • Denmark is an archipelago plus a peninsula: ~400 named islands. Expect a many-piece mask,
    and expect Natural Earth's 1:10 m coastline to disagree with it substantially at that
    scale. That disagreement is a conf/world.yaml matter, not a Danish one — see the
    warning below and #186.
  • The publisher renamed: SDFI/SDFE → Klimadatastyrelsen. sdfe.dk, sdfi.dk and
    kds.dk all still answer. Pin whichever host the metadata record itself gives.

The three things the Greece pilot got wrong — do not repeat them

  • The mask is the country's own outline and it does NOT drive the world carve. Build it
    from the national boundary source and stop. conf/world.yaml carves Natural Earth with
    Natural Earth's own admin-0 polygons and reads only the country code from
    map_country_mask_0, never its geometry (R144). Do not extend the mask over water to
    "fix" grey background land at a coast — Greece burned two rounds on exactly that, and the
    cause was in conf/world.yaml and applied to every country (#184, #186).
  • Never verify the carve by intersecting background land with the mask. That check is
    tautologically true — background_land is Natural Earth minus the carve — so it passes
    for any mask at all, including an empty one. The carve's real checks are R144/R145/R146 on
    conf/world.yaml; a country config does not need its own.
  • R34's reference is the country's LAND, not its mask (R143). Reference the land staging
    table explicitly, even when the mask happens to be the same geometry, or the check
    silently stops meaning anything the day that changes.

Deliverables

  1. conf/<cc>/ per R17: base.yaml, downloads.yaml, staging.yaml, acceptance.yaml,
    01-country_mask.yaml, 02-cover.yaml (build order is lexical), country: <cc> (R16).
  2. A Makefile import-<cc> target chaining import-world (R107) and a fetch-<cc> path
    through the importer's declared-downloads route (R10).
  3. Acceptance tests in the same commit: R119 (mask partition populated, the
    conf/fi/01-country_mask.yaml pattern), R34 (cover gapless against the land table,
    1% budget), R22 (coarse-tier vocabulary equals the level-1 rollup tier), R120 (no NULL
    cover_class), and a decoded tile (importer tiles --check).
  4. Paste the make acceptance tally in the PR — not ad-hoc SQL (AGENTS.md).

Verify against the live database before committing: partitions at every zoom, row counts,
NULLs in the columns that matter, a decoded tile.

Gated on #211 (the catalogue). Mask plus cover for Denmark, both from the **anonymous** Klimadatastyrelsen INSPIRE route — no token needed for the pilot. - **Mask**: `https://api.dataforsyningen.dk/ogcapi/features/au_inspire/collections/administrativeunit/items` → 105 units; filter `nationallevel = 1stOrder` for the country polygon (`name_gn_spell_spellofna_text = "Danmark"`, `nationalcode = DK`). Verified live, anonymous, **CC BY 4.0**. This is also the clean answer to the Greenland/Faroes scope question — they are separate country codes, not Danish administrative units in this dataset, so no filtering hack is needed. Say that in the config comment so a later reader does not go looking. - **Cover**: CORINE CLC 2018 via the existing `clms:` provider, identity mapping (R116), NUTS0 `DK`. Denmark's own `lc_inspire/landcoverunit` (**576 118** polygons, anonymous, CC BY 4.0) is far finer, but its classification is a **URI scheme into the Danish grunddatamodel** that must be enumerated and argued class by class in the `conf/se`/`conf/pl` style — that is the later upgrade, not the pilot. ## Denmark-specific - CRS is normally **EPSG:25832**; the OGC API returns GeoJSON in EPSG:4326. Check what arrives. - Denmark is an archipelago plus a peninsula: ~400 named islands. Expect a many-piece mask, and expect Natural Earth's 1:10 m coastline to disagree with it substantially at that scale. **That disagreement is a `conf/world.yaml` matter, not a Danish one** — see the warning below and #186. - The publisher renamed: SDFI/SDFE → **Klimadatastyrelsen**. `sdfe.dk`, `sdfi.dk` and `kds.dk` all still answer. Pin whichever host the metadata record itself gives. ## The three things the Greece pilot got wrong — do not repeat them - **The mask is the country's own outline and it does NOT drive the world carve.** Build it from the national boundary source and stop. `conf/world.yaml` carves Natural Earth with Natural Earth's *own* admin-0 polygons and reads only the `country` code from `map_country_mask_0`, never its geometry (R144). Do not extend the mask over water to "fix" grey background land at a coast — Greece burned two rounds on exactly that, and the cause was in `conf/world.yaml` and applied to every country (#184, #186). - **Never verify the carve by intersecting background land with the mask.** That check is tautologically true — `background_land` is Natural Earth *minus* the carve — so it passes for any mask at all, including an empty one. The carve's real checks are R144/R145/R146 on `conf/world.yaml`; a country config does not need its own. - **R34's reference is the country's LAND, not its mask** (R143). Reference the land staging table explicitly, even when the mask happens to be the same geometry, or the check silently stops meaning anything the day that changes. ## Deliverables 1. `conf/<cc>/` per R17: `base.yaml`, `downloads.yaml`, `staging.yaml`, `acceptance.yaml`, `01-country_mask.yaml`, `02-cover.yaml` (build order is lexical), `country: <cc>` (R16). 2. A Makefile `import-<cc>` target chaining `import-world` (R107) and a `fetch-<cc>` path through the importer's declared-downloads route (R10). 3. Acceptance tests **in the same commit**: R119 (mask partition populated, the `conf/fi/01-country_mask.yaml` pattern), R34 (cover gapless against the *land* table, 1% budget), R22 (coarse-tier vocabulary equals the level-1 rollup tier), R120 (no NULL `cover_class`), and a decoded tile (`importer tiles --check`). 4. Paste the `make acceptance` tally in the PR — not ad-hoc SQL (AGENTS.md). Verify against the live database before committing: partitions at every zoom, row counts, NULLs in the columns that matter, a decoded tile.
art-bot self-assigned this 2026-08-24 17:05:13 +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#218
No description provided.