#102: Sweden buildings from Topo 10 Byggnadsverk #161

Closed
art wants to merge 0 commits from issue-102-se-buildings into main
Owner

#102: Sweden buildings from Topo 10 Byggnadsverk

Closes #102


Sweden's partition of the shared buildings layer (issue #150's contract): 9 494 641
footprints
from the Byggnadsverk theme (own geotorget entry topo10-byggnadsverk,
3.7 GB unzipped, R5), every building ≥ 15 m² per the theme's collection spec.

The mapping (R137, full reasoning next to the query in conf/semap.yaml)

  • 2061 Bostad → residential (3.26M)
  • 2062 Industri + 2064 Verksamhet → industrial_commercial (202k)
  • 2063 Samhällsfunktion → public, except andamal1 Kommunhus / Polisstation /
    Kriminalvårdsanstalt → government (1 423 buildings — the only place any of the
    four sources names the government class directly)
  • 2065 Ekonomibyggnad / 2066 Komplementbyggnad / 2067 Övrig byggnad → other (5.87M)
  • No height: Topo 10 surveys none (Lantmäteriet's building heights are a separate,
    not-yet-negotiated product — the future 3D map's Swedish source), so height is
    NULL throughout.

Zoom rungs: z12 the 363k landmark footprints, z13 the 3.62M all-but-other set, z14
all 9.49M.

Verified

  • Acceptance: footprints = sum of source parts, nothing unclassified, government =
    the andamal1 count (a new andamal value drifting those rows to public fails the
    test), z12 keeps all three landmark classes; contract R119/R120; all 40 fast se
    tests pass; decoded tile carries [building_class height country]; CDP over
    Stockholm: z12 5 012 (landmark only), z13 8 907 (+residential), z14 2 760 (all
    five classes) in the same viewport.
  • Densest Stockholm z14 tile: 115 kB.
#102: Sweden buildings from Topo 10 Byggnadsverk Closes #102 --- Sweden's partition of the shared buildings layer (issue #150's contract): **9 494 641 footprints** from the Byggnadsverk theme (own geotorget entry `topo10-byggnadsverk`, 3.7 GB unzipped, R5), every building ≥ 15 m² per the theme's collection spec. ## The mapping (R137, full reasoning next to the query in conf/semap.yaml) - 2061 Bostad → residential (3.26M) - 2062 Industri + 2064 Verksamhet → industrial_commercial (202k) - 2063 Samhällsfunktion → public, except `andamal1` Kommunhus / Polisstation / Kriminalvårdsanstalt → **government (1 423 buildings — the only place any of the four sources names the government class directly)** - 2065 Ekonomibyggnad / 2066 Komplementbyggnad / 2067 Övrig byggnad → other (5.87M) - No height: Topo 10 surveys none (Lantmäteriet's building heights are a separate, not-yet-negotiated product — the future 3D map's Swedish source), so `height` is NULL throughout. Zoom rungs: z12 the 363k landmark footprints, z13 the 3.62M all-but-other set, z14 all 9.49M. ## Verified - Acceptance: footprints = sum of source parts, nothing unclassified, government = the andamal1 count (a new andamal value drifting those rows to public fails the test), z12 keeps all three landmark classes; contract R119/R120; all 40 fast se tests pass; decoded tile carries `[building_class height country]`; CDP over Stockholm: z12 5 012 (landmark only), z13 8 907 (+residential), z14 2 760 (all five classes) in the same viewport. - Densest Stockholm z14 tile: 115 kB.
The buildings contract (conf/common.yaml): footprint polygon + `building_class`
(five values: residential, industrial_commercial, public, government, other —
deliberately coarse so every country's unrelated source ladder collapses into
one set) + nullable `height` (metres; only Finland's MTK carries one today, the
column exists for the future 3D extrusion). z12–14, filter_only; the zoom
rungs are the contract's rule (z12 landmark classes, z13 all-but-other, z14
everything) expressed per country. Contract-level R119/R120 acceptance tests
hold every partition.

Iceland folds in: its IS 50V mannvirki is a POINT layer (no footprints exist
in the delivery), so the is partition carries the points buffered to ~25-unit
dots — the old dot rendering, as a polygon. The 16-code mannvirki ladder maps
to the five classes (mapping + judgement calls next to the query). The old
point layer, its building_type enum, its icons and its names are gone: the
style's buildings_dots/buildings_icons/building_names trio (source `is`)
becomes one `buildings` fill (source `map`), `other` rendering exactly like
`residential`, outline only at z14 where a footprint is big enough to carry
one.

Verified against the live DB: 23 607 footprints (1:1 with the source points,
acceptance-tested), all zooms populated, decoded tile carries exactly
[building_class height country], all 34 ismap acceptance tests pass, R30
probes added for the new layer (floor z11, maxz z15 over Iceland's densest
mannvirki tile, mid-Atlantic z5).
Adds the byggnadsverk_sverige.zip theme as its own geotorget entry
(`topo10-byggnadsverk`), separate from the topo10 order for the same
reason topo10-text is: delivery ids rotate, and adding the file to the
order's `files:` list would re-download every theme the day the delivery
id changes. 3.7 GB unzipped, 9 494 641 building polygons (R5 recorded in
docs/country-sweden.md with the layer).
The se partition of the shared buildings layer (conf/common.yaml contract,
#150): 9 494 641 footprints staged from the byggnadsverk theme (R5: 3.7 GB
unzipped), ST_Dumped to single polygons, and mapped from the seven-value
objekttypnr ladder — Bostad → residential, Industri + Verksamhet →
industrial_commercial, Samhällsfunktion → public except the andamal1
government set (Kommunhus/Polisstation/Kriminalvårdsanstalt, 1 423
buildings — the one place any of the four sources names the government
class directly), Ekonomibyggnad/Komplementbyggnad/Övrig byggnad → other.
No height: Topo 10 surveys none (the future 3D source is a separate
not-yet-negotiated product), so the column is NULL throughout.

Zoom rungs are the contract's three: z12 the 363k landmark footprints,
z13 the 3.62M all-but-other set, z14 all 9.49M. Densest Stockholm z14
tile measures 115 kB — no area filter needed.

Acceptance: footprints = sum of source parts, nothing unclassified,
government = the andamal1 count (a new andamal value drifting those rows
to public fails the test), z12 keeps all three landmark classes; plus the
contract's R119/R120. All 40 fast se tests pass; decoded tile carries
[building_class height country].
art force-pushed issue-102-se-buildings from 62db21f41b to a4b6f0cf23 2026-08-18 20:50:08 +00:00 Compare
art-bot closed this pull request 2026-08-18 22:44:45 +00:00
Collaborator

Folded into #160, which now carries the shared contracts and all four countries in one branch. This PR's branch already contained its predecessors, so reviewing it separately meant reviewing the same commits four times — and the country partitions have no meaning without the contract they land in.

Note for anyone reading this branch: it still has the unresolved conflict markers in the country docs that the review found. Those are fixed on #160's branch; do not merge or cherry-pick from here.

Folded into #160, which now carries the shared contracts and all four countries in one branch. This PR's branch already contained its predecessors, so reviewing it separately meant reviewing the same commits four times — and the country partitions have no meaning without the contract they land in. Note for anyone reading this branch: it still has the unresolved conflict markers in the country docs that the review found. Those are fixed on #160's branch; do not merge or cherry-pick from here.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!161
No description provided.