Route Computation
"/home/yossef/notes/git/projects/maplibra/flows/Route Computation.md"
path: maplibra/flows/Route Computation.md
- **fileName**: Route Computation
- **Created on**: 2026-06-16 00:48:42
Route Computation
Purpose: How a user route becomes rendered route features.
Related: ../Home.md, ../modules/Pathfinding.md, ../modules/Route Smoothing.md, ../modules/Snapping.md
Flow
- User selects or drops route endpoints.
src/pathfinding/snapping.jsproduces start and target snap candidates.src/pathfinding/route-compute.jsselects the best candidate pair and runs A*.- A* returns ordered graph node IDs.
src/pathfinding/route-features.jsconverts node IDs to per-floor LineString features.- ../modules/Route Smoothing.md runs validated straightening, simplification, shortcutting, curves, and human smoothing.
src/path-renderer.jsandsrc/path-renderer/*render the route line and connector markers.
Route Shape Cleanup
The route feature stage now starts with straightenWalkableStaircase() for shallow grid staircases, then straightenCorridorZigzag() for sharper clusters. Both are guarded by walkability checks.
Dropped Indoor Starts
src/pathfinding/drop-ui.js marks dropped indoor starts with strictRoomExit. During snapping, src/pathfinding/snapping.js keeps that behavior for small enclosed rooms, but disables the strict door-only path for room polygons larger than the configured strict-room area cutoff. This prevents large open indoor areas from routing to an unnecessary door before A* runs.
continue:[[]]
before:[[]]