#105: Poland buildings from BDOT10k OT_BUBD_A #162

Closed
art wants to merge 0 commits from issue-105-pl-buildings into main
Owner

#105: Poland buildings from BDOT10k OT_BUBD_A

Closes #105


Poland's partition of the shared buildings layer (issue #150's contract): 16 351 829
cadastral footprints
(EGiB geometry) glob-merged from all 380 county packages
(fetch widened by BUBD_A; the marker rename forces the ~25 GB re-pull per the R9 rule).
The single most numerous class in BDOT10k — measured on first fetch (R5), and about
four times GUGiK's published estimate for the whole class, which the GUGiK
per-województwo statistics can sanity-check against.

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

Maps on PRZEWAZAJACAFUNKCJABUDYNKU — the prevailing function, 165 single-valued
labels measured nationally — because that is what makes mixed-use buildings
unambiguous: 'budynek wielorodzinny|obiekt handlowo-usługowy' carries PRZEWAZAJACA
'budynek wielorodzinny' → residential, the building's own statement of what it mostly
is. FSBUD (the raw pipe-combined ladder) is the fallback for the 0.92% of rows where
the prevailing function is NULL. The regex ladder assigns all 165 values:
government (urzędy, sądy, prokuratury, policja, zakłady karne, straż graniczna,
przejścia graniczne, ministerstwa, placówki dyplomatyczne…), public (szkoły,
przedszkola, kościoły, szpitale, dworce, sport, koszary, straż pożarna…), residential,
industrial_commercial (handel, magazyny, produkcja, elektrownie, hotele, stacje
paliw… — apteka and the post office follow FUNKCJAOGOLNA's own commerce/office
grouping), and the unmatched remainder (budynek gospodarczy, garaż, szklarnia,
zabytek…) as other per the contract's escape hatch. No height: the 2021 schema
carries LICZBAKONDYGNACJI (storeys), not metres — not the same quantity, so not mapped.

Zoom rungs: z12 the ~1.35M landmark footprints, z13 the ~9.2M all-but-other set, z14
all 16.35M.

Verified

  • Acceptance: footprints = sum of source parts, nothing unclassified, z12 keeps all
    three landmark classes; contract R119/R120; all 11 pl buildings tests pass; decoded
    tile carries [building_class height country]; CDP over Warsaw: 3 533 footprints at
    z14 (all five classes), 9 821 landmark footprints at z12.
  • Densest z14 tile (Warsaw region): ~130 kB.
#105: Poland buildings from BDOT10k OT_BUBD_A Closes #105 --- Poland's partition of the shared buildings layer (issue #150's contract): **16 351 829 cadastral footprints** (EGiB geometry) glob-merged from all 380 county packages (fetch widened by BUBD_A; the marker rename forces the ~25 GB re-pull per the R9 rule). The single most numerous class in BDOT10k — measured on first fetch (R5), and about four times GUGiK's published estimate for the whole class, which the GUGiK per-województwo statistics can sanity-check against. ## The mapping (R137, full reasoning next to the query in conf/plmap.yaml) Maps on **PRZEWAZAJACAFUNKCJABUDYNKU** — the *prevailing* function, 165 single-valued labels measured nationally — because that is what makes mixed-use buildings unambiguous: 'budynek wielorodzinny|obiekt handlowo-usługowy' carries PRZEWAZAJACA 'budynek wielorodzinny' → residential, the building's own statement of what it mostly is. FSBUD (the raw pipe-combined ladder) is the fallback for the 0.92% of rows where the prevailing function is NULL. The regex ladder assigns all 165 values: government (urzędy, sądy, prokuratury, policja, zakłady karne, straż graniczna, przejścia graniczne, ministerstwa, placówki dyplomatyczne…), public (szkoły, przedszkola, kościoły, szpitale, dworce, sport, koszary, straż pożarna…), residential, industrial_commercial (handel, magazyny, produkcja, elektrownie, hotele, stacje paliw… — apteka and the post office follow FUNKCJAOGOLNA's own commerce/office grouping), and the unmatched remainder (budynek gospodarczy, garaż, szklarnia, zabytek…) as `other` per the contract's escape hatch. No height: the 2021 schema carries LICZBAKONDYGNACJI (storeys), not metres — not the same quantity, so not mapped. Zoom rungs: z12 the ~1.35M landmark footprints, z13 the ~9.2M all-but-other set, z14 all 16.35M. ## Verified - Acceptance: footprints = sum of source parts, nothing unclassified, z12 keeps all three landmark classes; contract R119/R120; all 11 pl buildings tests pass; decoded tile carries `[building_class height country]`; CDP over Warsaw: 3 533 footprints at z14 (all five classes), 9 821 landmark footprints at z12. - Densest z14 tile (Warsaw region): ~130 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 OT_BUBD_A to the fetch set and renames the extraction marker to
`pt-sw-sk-oikm-oipr-skpp-kuk-bubd`, which forces the ~25 GB re-pull the
widening needs (county zips are deleted after extraction — the marker
encodes WHICH classes were extracted, per the rule in the Makefile
comment). BUBD_A is BDOT10k's most numerous class (~7.5M objects
nationally, roughly a third of the database): the buildings layer's
source. 380/380 counties fetched and extracted; per-class GB/rows go in
docs/country-poland.md with the layer (R5).
The pl partition of the shared buildings layer (conf/common.yaml contract,
#150): 16 351 829 cadastral footprints (EGiB geometry) glob-merged from the
380 county packages, ST_Dumped to single polygons, and mapped from
PRZEWAZAJACAFUNKCJABUDYNKU — the *prevailing* function, 165 single-valued
labels measured nationally on first fetch (FSBUD, the raw pipe-combined
ladder, is the fallback for the 0.92% of rows where the prevailing function
is NULL). Mapping on the prevailing function is what makes mixed-use
buildings unambiguous: 'budynek wielorodzinny|obiekt handlowo-usługowy'
carries PRZEWAZAJACA 'budynek wielorodzinny' → residential. The regex
ladder assigns all 165 values — government (urzędy, sądy, policja, zakłady
karne, straż graniczna…), public (szkoły, kościoły, szpitale, dworce,
sport, koszary…), residential, industrial_commercial (handel, magazyny,
produkcja, elektrownie, hotele, stacje paliw… — with apteka and the post
office following FUNKCJAOGOLNA's own commerce/office grouping), and the
unmatched remainder (gospodarczy, garaż, szklarnia, zabytek…) as `other`
per the contract's escape hatch. No height: the schema carries
LICZBAKONDYGNACJI (storeys), not metres.

Zoom rungs: z12 the ~1.35M landmark footprints, z13 the ~9.2M all-but-other
set, z14 all 16.35M. Densest z14 tile (Warsaw region) measures ~130 kB —
no area filter needed.

Acceptance: footprints = sum of source parts (16 351 829), nothing
unclassified, the z12 rung keeps all three landmark classes; plus the
contract's R119/R120. All 11 pl buildings tests pass; decoded tile carries
[building_class height country]; CDP render over Warsaw shows 3 533
footprints at z14 (all five classes) and 9 821 landmark footprints at z12.
art force-pushed issue-105-pl-buildings from a22f295494 to 046fd0190e 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!162
No description provided.