Skip to content

chassis: bundle the Spain sub-map (17 autonomous communities + Canaries inset)#478

Merged
ChBrain merged 1 commit into
mainfrom
chassis/spain-sub-map
Jul 8, 2026
Merged

chassis: bundle the Spain sub-map (17 autonomous communities + Canaries inset)#478
ChBrain merged 1 commit into
mainfrom
chassis/spain-sub-map

Conversation

@ChBrain

@ChBrain ChBrain commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Why

@chbrain/khai-cultures 0.286.0 introduces Spain's 17 autonomous communities as ISO 3166‑2 subdivision cultures (ES-ANES-VC). Once that ships, the cultures map treats Spain as a branch country and generates /cultures/map/es/ — but with no bundled es.geo.json, subMapFor("ES") returns null and the page falls back to list-only (no map), unlike DE/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 (as de.geo.json is one per Bundesland). Ceuta/Melilla are dropped — not among the 17 the cultures anchor to.
  • The Canary Islands (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 in de-map.ts stays undistorted — the same approach us.geo.json uses for Alaska/Hawaii. No projector change needed.
  • src/lib/de-map.ts — register ES in SUBMAPS.

Verification

Built with khai-cultures@0.286.0 installed: /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. path count in the SVG = 17, all keyed ES-XX; no list-only fallback.

Note: this PR does not bump khai-cultures (that's a deps/* change on its own branch). Merge this first so Spain never ships map-less.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BVN8UQMaFonV3Ky1UAkJNZ


Generated by Claude Code

…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
ChBrain merged commit 9cb95f3 into main Jul 8, 2026
37 checks passed
@ChBrain
ChBrain deleted the chassis/spain-sub-map branch July 8, 2026 15:14
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants