navigator/package.json
hermes-explorigin db292409f1
All checks were successful
CI / test-and-build (push) Successful in 1m3s
Add OSM data-dump ingestion + in-browser routing with POI avoidance
- scripts/osm-dump.mjs: download & stream-parse regional .osm.pbf extracts
  (Geofabrik/BBBike etc). Clips to bbox, extracts POI features (poiTags),
  and builds a routable road graph (coords + weighted adj) from road ways.
  Caches the downloaded .pbf under scripts/.cache/ (git-ignored). Default:
  Geofabrik Oklahoma extract -> tulsa-dump layer (12.8k POIs, 55k-node graph).
- src/lib/routing.ts: client-side A* routing over the graph. Snaps A/B to
  nearest nodes, supports avoid-rules (category + radius, block or penalty)
  built from nearby POIs; returns waypoints + distance.
- src/lib/components/DirectionsPanel.svelte: Directions UI — pick A/B by
  clicking the map, choose POI categories to avoid, compute & draw the route.
- MapView: adds a Directions toggle when a dump layer with a graph is present.
- package.json: add 'build:dump'; build now runs data + dump + static.
- scripts/test.mjs: validate dump manifest entries + routing graph structure.
- README: document dump ingestion and the routing/avoid feature.
2026-08-09 15:19:35 +00:00

35 lines
1.0 KiB
JSON

{
"name": "navigator",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"data": "node scripts/osm-data.mjs",
"data:area": "node scripts/osm-data.mjs",
"build:data": "node scripts/osm-data.mjs",
"build:dump": "node scripts/osm-dump.mjs",
"build": "npm run build:data && npm run build:dump && vite build",
"build:static": "vite build",
"test": "tsx scripts/test.mjs",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.63.0",
"@sveltejs/vite-plugin-svelte": "^7.1.2",
"svelte": "^5.56.1",
"svelte-check": "^4.6.0",
"tsx": "^4.19.2",
"typescript": "^6.0.3",
"vite": "^8.0.16"
},
"dependencies": {
"@types/leaflet": "^1.9.22",
"leaflet": "^1.9.4",
"osm-pbf-parser": "^2.3.0"
}
}