chassis: bundle the Spain sub-map (17 autonomous communities + Canaries inset)#478
Merged
Conversation
…es inset) khai-cultures gains Spain's 17 autonomous communities as ISO 3166-2 subdivision cultures (ES-AN … ES-VC). Give ES the same real sub-map DE/GB/US have, so its /cultures/map/es/ page drills into a map rather than a list. - src/lib/es.geo.json: the 17 communities, dissolved from Natural Earth 10m admin-1 provinces (public domain) and rekeyed province -> community ISO. The Canary Islands (ES-CN) are baked into a lower-left inset so the mainland bbox fit stays undistorted (same approach us.geo.json uses for AK/HI). - src/lib/de-map.ts: register ES in SUBMAPS. Verified: build renders /cultures/map/es/ with 17 community outlines (province borders dissolved), Madrid enclave, Balearics, and the Canaries inset clear of the mainland. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVN8UQMaFonV3Ky1UAkJNZ
ChBrain
added a commit
that referenced
this pull request
Jul 8, 2026
…ys) (#479) npm run deps:sync off the updated main (which now carries the Spain sub-map, #478). Three @ChBrain packages had new releases: - @chbrain/khai-cultures 0.264.0 -> 0.286.0 (Spain's 17 autonomous communities) - @chbrain/khai-plays-dickens 0.5.0 -> 0.10.0 - @chbrain/khai-plays-hcandersen 0.212.0 -> 0.214.0 The cultures bump lands after the chassis sub-map so Spain drills into a real map, not a list. Verified: build renders /cultures/map/es/ with 17 community outlines; every subdivision country (DE/ES/GB/US) has a bundled sub-map; the Dickens and HC Andersen play pages build. Claude-Session: https://claude.ai/code/session_01BVN8UQMaFonV3Ky1UAkJNZ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
@chbrain/khai-cultures0.286.0 introduces Spain's 17 autonomous communities as ISO 3166‑2 subdivision cultures (ES-AN…ES-VC). Once that ships, the cultures map treats Spain as a branch country and generates/cultures/map/es/— but with no bundledes.geo.json,subMapFor("ES")returnsnulland the page falls back to list-only (no map), unlikeDE/GB/US. This lands the sub-map first (chassis → surface layer order) so Spain gets map parity the moment the cultures bump merges.What
src/lib/es.geo.json— the 17 communities, topologically dissolved from Natural Earth 10m admin‑1 provinces (public domain) and rekeyed province → community ISO (ES-XX), so internal province borders are erased and each community is one clean outline (asde.geo.jsonis one per Bundesland). Ceuta/Melilla are dropped — not among the 17 the cultures anchor to.ES-CN) sit ~1,000 km off Africa; their geometry is baked into a lower-left inset (uniform scale + translate) so the mainland bounding‑box fit inde-map.tsstays undistorted — the same approachus.geo.jsonuses for Alaska/Hawaii. No projector change needed.src/lib/de-map.ts— registerESinSUBMAPS.Verification
Built with
khai-cultures@0.286.0installed:/cultures/map/es/renders the real map — 17 community outlines (province borders dissolved), Madrid as its central enclave, the Balearics, and the Canaries inset clear of the mainland.pathcount in the SVG = 17, all keyedES-XX; no list-only fallback.🤖 Generated with Claude Code
https://claude.ai/code/session_01BVN8UQMaFonV3Ky1UAkJNZ
Generated by Claude Code