Greece: contours — DEM-traced contour lines into the shared contours layer #207

Open
opened 2026-08-21 08:01:17 +00:00 by art · 1 comment
Owner

Greece: contours — DEM-traced contour lines into the shared contours layer

Scope: Greece's contours partition of the shared map_contours_<z> tables. The last terrain gap where Iceland has data and no one else, plus Greece. (Siblings: Sweden #101, Finland #107; the Greece peaks issue is the sibling that shares the EU-DEM source and the dem.go machinery.)

The source: EU-DEM v1.1 (Copernicus, 25 m) through the existing clms: provider — same research gate as the Greece peaks issue (no national Greek vector contours; ΓΥΣ restricted; data.gov.gr municipal WMS only; EU-DEM is the sole official downloadable elevation). Read the peaks sibling for the full R6 record.

The new machinery: DEM→contour line tracing does not exist in the importer. This issue is where it gets built:

  1. A contour-tracing stage in importer/dem.go (or a sibling): parse the EU-DEM tiles, trace contour polylines at a fixed interval via marching-squares, assemble them across the tile grid (seams handled like dem.go's halo/own-extent convention so a line crossing a tile boundary is not cut), and assign the elevation + the interval_class/index marker the contours contract wants. Iceland 20 m, Sweden/Finland 5 m, EU-DEM 25 m — the trace interval for Greece should be 20 m (or 25 m to match the grid) and the index cadence (interval_class = 1) the 100 m lines, matching the contract's convention (the style strokes/labels interval_class 1).
  2. The peaks sibling and this issue SHARE the EU-DEM fetch and the DEM tile reader — coordinate so the fetch/read is done once (a shared staging table or a shared stage) and the two layers derive from it.
  3. The worker must verify EU-DEM tile CRS/units against dem.go's assumptions (Finland's dem25m is KKJ/EPSG:2393 decimetres; EU-DEM is likely EPSG:3035 or 3857 in whole metres) and extend the reader generically rather than copying it per-country.

Plan:

  1. Add the EU-DEM Greece fetch to conf/gr/downloads.yaml (clms: entry; verify the CLMS EU-DEM identifiers and download shape — per-NUTS crop vs per-sheet glob).
  2. Build the contour-tracing stage; verify the traced lines against a known reference (e.g. Olympus's 2 917 m summit — the 2900 m contour must close around it; a coast-aligned lowland check at 0/20/40 m).
  3. Land conf/gr/NN-contours.yaml (extends: contours) with acceptance tests: the shared R119/R120 plus a Greece-specific claim (the trace interval is honest — no line carries a non-cadence elevation; Olympus's summit ring present). A zoom cascade appropriate to a 25 m-derived 20 m set (denser than Iceland's 20 m source, sparser than Sweden/Finland's 5 m — the interval_class ladder should carry the coarse-zoom thinning).
  4. Verify against the live database, make acceptance, update docs/country-gr.md's verdict table, and update the mechanism docs (docs/architecture.md/docs/schema.md) for the new DEM stage if it changes the pipeline.

This is the largest piece of the terrain closure: the contour-tracing stage is a real importer subsystem (the size of arcgis.go/clms.go). Build it as such — a general raster→contour stage, not a Greece one-off — because Poland's #104 block is exactly the missing machinery (its national NMT is infeasible to fetch, but a working contour stage makes a future NMT-arc pilot possible).

Greece: contours — DEM-traced contour lines into the shared contours layer Scope: Greece's `contours` partition of the shared `map_contours_<z>` tables. The last terrain gap where Iceland has data and no one else, plus Greece. (Siblings: Sweden #101, Finland #107; the Greece peaks issue is the sibling that shares the EU-DEM source and the dem.go machinery.) The source: **EU-DEM v1.1** (Copernicus, 25 m) through the existing `clms:` provider — same research gate as the Greece peaks issue (no national Greek vector contours; ΓΥΣ restricted; data.gov.gr municipal WMS only; EU-DEM is the sole official downloadable elevation). Read the peaks sibling for the full R6 record. The new machinery: **DEM→contour line tracing does not exist in the importer.** This issue is where it gets built: 1. A contour-tracing stage in `importer/dem.go` (or a sibling): parse the EU-DEM tiles, trace contour polylines at a fixed interval via marching-squares, assemble them across the tile grid (seams handled like dem.go's halo/own-extent convention so a line crossing a tile boundary is not cut), and assign the elevation + the interval_class/index marker the `contours` contract wants. Iceland 20 m, Sweden/Finland 5 m, EU-DEM 25 m — the trace interval for Greece should be 20 m (or 25 m to match the grid) and the index cadence (interval_class = 1) the 100 m lines, matching the contract's convention (the style strokes/labels interval_class 1). 2. The peaks sibling and this issue SHARE the EU-DEM fetch and the DEM tile reader — coordinate so the fetch/read is done once (a shared staging table or a shared stage) and the two layers derive from it. 3. The worker must verify EU-DEM tile CRS/units against dem.go's assumptions (Finland's dem25m is KKJ/EPSG:2393 decimetres; EU-DEM is likely EPSG:3035 or 3857 in whole metres) and extend the reader generically rather than copying it per-country. Plan: 1. Add the EU-DEM Greece fetch to `conf/gr/downloads.yaml` (`clms:` entry; verify the CLMS EU-DEM identifiers and download shape — per-NUTS crop vs per-sheet glob). 2. Build the contour-tracing stage; verify the traced lines against a known reference (e.g. Olympus's 2 917 m summit — the 2900 m contour must close around it; a coast-aligned lowland check at 0/20/40 m). 3. Land `conf/gr/NN-contours.yaml` (`extends: contours`) with acceptance tests: the shared R119/R120 plus a Greece-specific claim (the trace interval is honest — no line carries a non-cadence elevation; Olympus's summit ring present). A zoom cascade appropriate to a 25 m-derived 20 m set (denser than Iceland's 20 m source, sparser than Sweden/Finland's 5 m — the interval_class ladder should carry the coarse-zoom thinning). 4. Verify against the live database, `make acceptance`, update `docs/country-gr.md`'s verdict table, and update the mechanism docs (`docs/architecture.md`/`docs/schema.md`) for the new DEM stage if it changes the pipeline. This is the largest piece of the terrain closure: the contour-tracing stage is a real importer subsystem (the size of arcgis.go/clms.go). Build it as such — a general raster→contour stage, not a Greece one-off — because Poland's #104 block is exactly the missing machinery (its national NMT is infeasible to fetch, but a working contour stage makes a future NMT-arc pilot possible).
Author
Owner

Maintainer decision (2026-08-21): Greece contours source = COP-DEM GLO-30 via the new CDSE provider (same as #206), and the DEM→contour tracing stage is to be built as a GENERAL importer subsystem (marching squares, tile-seam assembly), usable for a future Poland NMT arc. Scope confirmed.

Maintainer decision (2026-08-21): Greece contours source = COP-DEM GLO-30 via the new CDSE provider (same as #206), and the DEM→contour tracing stage is to be built as a GENERAL importer subsystem (marching squares, tile-seam assembly), usable for a future Poland NMT arc. Scope confirmed.
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#207
No description provided.