perf(atlas): keep the admin0 country index as Int16 arrays and send countries/geo from disk

This commit is contained in:
Vini
2026-10-27 10:28:31 +01:00
committed by Maurice
parent c94ff7421a
commit f56f6ae11e
10 changed files with 321 additions and 114 deletions
+1 -1
View File
@@ -372,7 +372,7 @@ async function pool(items, worker) {
// the now-redundant consecutive duplicate points shrinks the bundles ~5-8x with no
// visible effect at the atlas' zoom range (3-10). ADM0 fills are viewed zoomed out, so
// they tolerate a coarser grid than ADM1 region borders.
const ADM0_DECIMALS = 2; // ~1.1 km
const ADM0_DECIMALS = 2; // ~1.1 km; the server's country index packs ×100 into Int16 (ADMIN0_SCALE in country-borders.ts), raise both
const ADM1_DECIMALS = 3; // ~110 m; the server's region cache packs ×1000 (REGION_SCALE in atlas-geo.ts), raise both
function quantizeRing(ring, decimals) {