mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 02:34:21 +00:00
build(atlas): build the globe geometry from the bundled boundaries
scripts/build-atlas-mesh.mjs turns the admin-0 and admin-1 GeoJSON the server already ships into TopoJSON at three levels of detail per world and two per country's regions, smoothed, quantized and Brotli-packed under content-hashed names, plus a manifest with every country's anchor, box and region index. It runs at build time (npm run build, npm run dev when the sources changed, and the Docker server stage); the output is not committed. /api/addons/atlas/mesh serves the manifest and the files as they are (immutable, a year), decompressing as a stream for a client without br.
This commit is contained in:
+7
-2
@@ -7,8 +7,9 @@
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"start": "node --require tsconfig-paths/register dist/index.js",
|
||||
"dev": "node scripts/dev.mjs",
|
||||
"build": "node scripts/build.mjs",
|
||||
"dev": "node scripts/build-atlas-mesh.mjs --if-stale && node scripts/dev.mjs",
|
||||
"build:atlas-mesh": "node scripts/build-atlas-mesh.mjs --if-stale",
|
||||
"build": "node scripts/build-atlas-mesh.mjs --if-stale && node scripts/build.mjs",
|
||||
"start:prod": "node --require tsconfig-paths/register dist/index.js",
|
||||
"reset-admin": "node reset-admin.js",
|
||||
"db:move-to-postgres": "node --import tsx src/move-to-postgres.ts",
|
||||
@@ -149,9 +150,13 @@
|
||||
"eslint": "^9.39.5",
|
||||
"eslint-config-flat-gitignore": "^2.4.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"polylabel": "^2.0.1",
|
||||
"prettier": "^3.10.1",
|
||||
"prettier-plugin-organize-imports": "^4.3.0",
|
||||
"supertest": "^7.3.1",
|
||||
"topojson-client": "^3.1.0",
|
||||
"topojson-server": "^3.0.1",
|
||||
"topojson-simplify": "^3.0.3",
|
||||
"typescript-eslint": "^8.74.0",
|
||||
"unplugin-swc": "^1.6.0",
|
||||
"vitest": "^5.1.2"
|
||||
|
||||
Reference in New Issue
Block a user