Re-coarsen RU-ARK Arctic-coast band into RU-PEO + RU-YAM (#41)
CI / build + unit + e2e (pull_request) Successful in 2m34s
CI / build + unit + e2e (pull_request) Successful in 2m34s
#41: re-partition the RU-ARK mainland's 28-part lat>=68 Arctic-coast band into two new regions via a new turf-free, idempotent pipeline stage scripts/split-arkhangel-band.mjs (npm run split:regions:band), mirroring the #31 split: - RU-PEO (Pechora, 13 parts, ~37,678 km2) -> key pechora-qwhs - RU-YAM (Yamal, 15 parts, ~51,722 km2) -> key yamal-gosw - RU-ARK keeps its id/name/key arkhangel-sk-lhbk (ownership-safe); the 5-part lat<68 core (~305,229 km2) stays RU-ARK. Pure re-partition: no geometry moved (byte-identical union). The two new features are inserted immediately after RU-ARK-SZ. Manifests regenerated with the real scripts (1,798 -> 1,800 keys + adjacency; adjacency pairs 4,471 -> 4,473). Fixed-point dataset unchanged except feature count (11,794 parts / 11,795 rings / 164,801 verts / 1 KZ-KZY hole). Four dataset/manifest tests updated (RUS 82 -> 84 sub-regions). Version 0.25.0 -> 0.26.0. Fixes #41
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* SQLite and shown to the LLM. Within any name-slug group (e.g. the six
|
||||
* regions all named "Western") the 4-char codes are made distinct by
|
||||
* re-deriving with a deterministic salt on collision, which guarantees the
|
||||
* full key is unique across all 1,798 regions.
|
||||
* full key is unique across all 1,800 regions.
|
||||
*
|
||||
* Output: `public/region-keys.json` — a `{ [stableFeatureId]: regionKey }`
|
||||
* object, e.g. `{ "FR-57": "brittany-xk2a" }`, in file (stable) order. The map
|
||||
@@ -107,8 +107,8 @@ const geoFile = path.join(root, 'public', 'regions.geo.json');
|
||||
const geo = JSON.parse(readFileSync(geoFile, 'utf8'));
|
||||
const features = Array.isArray(geo?.features) ? geo.features : [];
|
||||
|
||||
if (features.length !== 1798) {
|
||||
throw new Error(`expected 1,798 regions, got ${features.length} — regions.geo.json changed; re-verify the region-key contract`);
|
||||
if (features.length !== 1800) {
|
||||
throw new Error(`expected 1,800 regions, got ${features.length} — regions.geo.json changed; re-verify the region-key contract`);
|
||||
}
|
||||
|
||||
// Group features by their (computed) name-slug, preserving file order, so the
|
||||
@@ -154,5 +154,5 @@ writeFileSync(path.join(root, 'public', 'region-keys.json'), out);
|
||||
const western = Object.entries(manifest)
|
||||
.filter(([, k]) => k.startsWith('western-'))
|
||||
.sort((a, b) => a[0] < b[0] ? -1 : 1);
|
||||
console.log(`[build-region-keys] wrote public/region-keys.json — ${keys.length} unique region keys (1,798 expected)`);
|
||||
console.log(`[build-region-keys] wrote public/region-keys.json — ${keys.length} unique region keys (1,800 expected)`);
|
||||
console.log(` western group: ${western.map(([id, k]) => `${id}=${k}`).join(', ')}`);
|
||||
|
||||
Reference in New Issue
Block a user