#109: Finland buildings from MTK-rakennus #163

Closed
art wants to merge 0 commits from issue-109-fi-buildings into main
Owner

#109: Finland buildings from MTK-rakennus

Closes #109


Finland's partition of the shared buildings layer (issue #150's contract): 5 627 446
footprints
from the rakennus table (4.39 GB zipped, recorded on first fetch, R5).

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

The kohdemalli's floor-count ladder — the coarsest of the four countries:
4221x asuin → residential, 4222x toimisto- tai julkinen → public (the source cannot
split offices from public buildings; R137: stop at the class the source
distinguishes), 4223x loma → residential (the 515k cottages), 4224x teollinen →
industrial_commercial, 4225x + 42270 kirkko → public, and 4226x muu → other
(3.56M rows — MTK has no commercial/storage/agricultural classes, so shops, barns
and sheds all live in the catch-all, the contract's escape hatch)
. There is no
government class, so fi's government partition is empty by design (tested).

No height — measured on the delivery, not assumed. rakennus carries
korkeusarvo, but its values are the building's highest point above sea level in
millimetres
: verified korkeusarvo = 1000 × the geometry envelope's Z (40 000–77 000
for "1–2 floor residential" rows in the 60–130 m-ASL lake plateau — a 1–2 storey
house cannot be 40–77 m tall). So the 0.2% of rows carrying it are not usable as
building height, and the partition's height is NULL throughout. The finding is
recorded next to the query and in docs/country-finland.md (the user's planned 3D
source for Finland would have to be something else).

Zoom rungs: z12 the 149k landmark footprints (industrial + public), z13 the ~2.05M
all-but-other set, z14 all 5.63M.

Verified

  • Acceptance: footprints = sum of source parts, nothing unclassified, class counts
    equal the kohdeluokka ladder's (a remapped or new kohdeluokka drifts the counts
    and fails), z12 keeps the two classes Finland has; contract R119/R120; all 13 fi
    buildings tests pass; decoded tile carries [building_class height country]; CDP
    over Helsinki: 976 footprints at z14.
  • Densest z14 tile: ~59 kB.
#109: Finland buildings from MTK-rakennus Closes #109 --- Finland's partition of the shared buildings layer (issue #150's contract): **5 627 446 footprints** from the `rakennus` table (4.39 GB zipped, recorded on first fetch, R5). ## The mapping (R137, full reasoning next to the query in conf/fimap.yaml) The kohdemalli's floor-count ladder — the **coarsest of the four countries**: 4221x asuin → residential, 4222x toimisto- tai julkinen → public (the source cannot split offices from public buildings; R137: stop at the class the source distinguishes), 4223x loma → residential (the 515k cottages), 4224x teollinen → industrial_commercial, 4225x + 42270 kirkko → public, and 4226x muu → **other (3.56M rows — MTK has no commercial/storage/agricultural classes, so shops, barns and sheds all live in the catch-all, the contract's escape hatch)**. There is no government class, so fi's government partition is empty by design (tested). **No height — measured on the delivery, not assumed.** `rakennus` carries `korkeusarvo`, but its values are the building's highest point **above sea level in millimetres**: verified korkeusarvo = 1000 × the geometry envelope's Z (40 000–77 000 for "1–2 floor residential" rows in the 60–130 m-ASL lake plateau — a 1–2 storey house cannot be 40–77 m tall). So the 0.2% of rows carrying it are not usable as building height, and the partition's height is NULL throughout. The finding is recorded next to the query and in docs/country-finland.md (the user's planned 3D source for Finland would have to be something else). Zoom rungs: z12 the 149k landmark footprints (industrial + public), z13 the ~2.05M all-but-other set, z14 all 5.63M. ## Verified - Acceptance: footprints = sum of source parts, nothing unclassified, class counts equal the kohdeluokka ladder's (a remapped or new kohdeluokka drifts the counts and fails), z12 keeps the two classes Finland has; contract R119/R120; all 13 fi buildings tests pass; decoded tile carries `[building_class height country]`; CDP over Helsinki: 976 footprints at z14. - Densest z14 tile: ~59 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 MTK-rakennus_25-04-03.gpkg download (4.39 GB zipped, recorded on
first fetch per R5) to fimap.yaml's downloads. The full MTK set is nine
files and 112 GB; this is the one the buildings layer reads (issue #150's
shared contract).
The fi partition of the shared buildings layer (conf/common.yaml contract,
#150): 5 627 446 footprints staged from the rakennus table (4.39 GB zipped,
R5 recorded in docs/country-finland.md), ST_Force2D + ST_Dump, and mapped
from the kohdemalli's floor-count ladder — the coarsest of the four
countries: 4221x asuin → residential, 4222x toimisto- tai julkinen →
public (the source cannot split offices from public buildings; R137: stop
at the class the source distinguishes), 4223x loma → residential, 4224x
teollinen → industrial_commercial, 4225x + 42270 kirkko → public, 4226x
muu → other (3.56M rows: MTK has no commercial/storage/agricultural
classes, so shops, barns and sheds all live in the catch-all — the
contract's escape hatch). No government class exists, so fi's government
partition is empty by design (tested).

NO HEIGHT, measured on the delivery: rakennus carries korkeusarvo, but its
values are the building's highest point ABOVE SEA LEVEL in millimetres —
verified korkeusarvo = 1000 × the geometry envelope's Z (40 000–77 000 for
"1–2 floor residential" rows in the 60–130 m-ASL lake plateau), not a
height above ground. The 0.2% of rows carrying it are unusable for the 3D
map, so the partition's height is NULL throughout; the finding is recorded
next to the query (R6-style: measured, not assumed) and in
docs/country-finland.md.

Zoom rungs: z12 the 149k landmark footprints (industrial + public),
z13 the ~2.05M all-but-other set, z14 all 5.63M.

Acceptance: footprints = sum of source parts, nothing unclassified, class
counts equal the kohdeluokka ladder's (a remapped or new kohdeluokka drifts
the counts and fails), the z12 rung keeps the two classes Finland has; plus
the contract's R119/R120. All 13 fi buildings tests pass; decoded tile
carries [building_class height country]; CDP render over Helsinki shows 976
footprints at z14.
art force-pushed issue-109-fi-buildings from c355a8e8e6 to 3418536560 2026-08-18 20:50:09 +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!163
No description provided.