No reviewers
Labels
No labels
blocked
claude-wip
map-report
map:is
map:se
needs-review
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
art/ismap!160
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-150-shared-buildings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #150
Closes #102
Closes #105
Closes #109
Buildings, end to end: the shared contracts, all four countries, and the review fixes.
Originally four stacked PRs (#160 #161 #162 #163) — folded into this one, since each
branch already contained its predecessors and the country partitions have no meaning
without the contract they land in.
Two contracts, not one
Buildings arrive as two different kinds of thing, so they get two shared layers.
buildings— one footprint polygon per building,building_class(a five-valueenum: residential, industrial_commercial, public, government, other) and a nullable
height. z12–14,filter_only. The zoom ladder is the contract's rule, expressed asper-country
zoom_filters: z12 the landmark classes (industrial_commercial +public + government — what reads at 1:200 000), z13 all-but-
other, z14everything.
otheris the escape hatch the contract is designed around: a countrywhose source has no sensible classification puts everything there (legal by design),
and the style draws it exactly like
residential, so an honest "we don't know" coststhe map nothing visible.
building_points— one point per building, the sixteen-valuebuilding_typeladder, and a
name. Same three rungs, same floors. This is the contract forregisters that survey buildings as points instead of polygons.
Why two. The first cut of this work had one contract and buffered Iceland's points
into it as ~25-unit dots. That trade was wrong twice over: a buffered point is not a
footprint (nothing downstream — area, extrusion, a real outline at z14 — means anything
on it), and squeezing a sixteen-value register through the five-value
building_classthrows away exactly the information a point still has. Iceland lost its per-type icons
and its building names to fill a contract it does not fit. A point's whole payload IS
its class, so the class stays fine-grained and the rendering is a symbol, not a shape.
heightis NULL across all three footprint partitions today — measured in each case,not assumed. Sweden's Topo 10 surveys none; Poland's
LICZBAKONDYGNACJIis storeys,not metres; and Finland's
korkeusarvolooks like a height but is the building'shighest point above sea level in millimetres (verified:
korkeusarvo= 1000 × thegeometry envelope's Z — 40 000–77 000 for "1–2 floor residential" rows on a 60–130 m
plateau). The column stays for a future 3D extrusion.
Contract-level R119/R120 hold every partition of both layers.
The four countries
building_points)Sweden maps
objekttypnr2061 Bostad → residential, 2062/2064 → industrial_commercial, 2063 Samhällsfunktion → public except
andamal1Kommunhus / Polisstation/ Kriminalvårdsanstalt → government (1 423 — the only place any source names the
class directly), 2065–2067 → other. Only
andamal1is read: the source allows fivepurposes and 131 buildings name a government purpose in a secondary slot, but the
primary purpose wins.
Poland maps on
PRZEWAZAJACAFUNKCJABUDYNKU, the prevailing function — 165single-valued labels — because that is what makes mixed-use unambiguous, with
FSBUDas fallback for the 0.92% where it is NULL. Geometry is EGiB cadastral footprints,
glob-merged from all 380 county packages.
Finland is the coarsest of the three: the kohdeluokka ladder cannot split offices
from public buildings (all → public), has no government class at all (fi's government
partition is empty by design, and tested), and dumps shops, barns and sheds into a
3.56M-row
muucatch-all → other.Iceland feeds
building_pointsand has nobuildingspartition. The 16-codemannvirki ladder became the shared
building_typeenum unchanged, so the style stillpicks a per-type icon with
["get", "building_type"].The style
buildingsis one fill layer: warm grey for residential/other, neutral grey forindustrial_commercial, warmer tan for public, warmest for government. The outline is a
stepon zoom that equals the fill below z14 and darkens at z14+ — below that afootprint is a pixel or two and a 1 px outline would eat it.
buildings_dots/buildings_icons/building_namesreadbuilding_points. Allsixteen
building_typevalues are drawn exactly once: five as plain dots, eleven asMaki sprite icons, names labelling from z13 (
text-optional).68 style layers now: 63 from
map, 4 Iceland-only fromis, 1 sourceless.Two bugs the review found in Poland's ladder
Both found by counting the ladder's output against the source rather than by reading
it, and both worth recording because the shape recurs in any regex mapping:
urzadmatched nothing. The register always writesurząd. So ~9 800 townhalls, customs and voivodeship offices fell through every branch to
other— whichz12 and z13 drop — making Poland's town halls invisible above z14, while
governmentstill looked populated (6 784 rows, the ones that also matchedstarostwo/policj/graniczn) so no test noticed. Nowurz[ąę]d: government is16 935. A diacritic-free alternative in this ladder is always a bug.
operaalternative also matched 'placówka operatora pocztowego',filing 3 002 post offices as
public— the opposite of what the config's own commentsays they get. Now
\mopera\M. A short alternative in a 165-value ladder needs a wordboundary.
Both got a regression test.
governmentis now pinned against the source's urząd count(the old
government > 0passed throughout the bug), and the opera alternative's wordboundary is asserted on the pattern itself — no table, one millisecond.
Also from the review
pl_bubdadded to Poland's R105 staging check — the staging block had 26 tables andthe check named 25, leaving Poland's largest staging table unchecked.
measured 16 351 829 / "roughly a quarter", and the wrong attribute name fixed.
docs/country-poland.md, and committed conflict markers in the Poland and Finland
country docs — all fixed.
importer/tiles_test.gono longer uses a per-countrybuildingslayer as itsfixture; that config shape cannot exist any more.
Verified
and test clean; every query prepares (
check-queries, 0 PROPERTYNAME violations).[building_class height country]and[building_type name country].footprints and 3 884 of points; Stockholm is 6 394 of footprints and 0 points.
buildings tile is 126 kB, the full
zxy_maptile over it 160 kB.z12/z13/z14 = 814 / 11 164 / 23 607, all 23 607 named.
Known, deliberately not fixed here
Buildings currently draw over streets and place labels. That is a style-ordering
problem the whole map has, not something this contract introduces — tracked separately.
map5f2410c08dmapsource, and the R30 maxz probe points at Stockholm a662b4123aef9305b198to1f7b95a821#150: shared buildings layer — one contract, four partitions, style readsto buildings: two shared contracts, four countries (#150, #102, #105, #109)map