Graph Construction
"/home/yossef/notes/git/projects/maplibra/flows/Graph Construction.md"
path: maplibra/flows/Graph Construction.md
- **fileName**: Graph Construction
- **Created on**: 2026-06-16 00:48:42
Graph Construction
Purpose: How MVF geometry becomes routing graph assets.
Related: ../Home.md, ../modules/MVF Format.md, ../modules/Pathfinding.md, ./Wall Detection.md
Flow
src/app/zip-node-builder.jsreads floors, geometry, walkable maps, kinds, nonwalkable maps, styles, and connections from a zip.- Walkable polygons are sampled into graph candidate points.
- Narrow corridor polygons can also receive center-line nodes.
- Door bridge nodes are injected around door geometry.
- Candidate walk edges are built between nearby nodes when sampled blocker checks allow the segment.
- Connector edges are added for stairs, elevators, ramps, and escalators.
- Output includes
routing/graph.json, binary graph files, walkable areas, and debug assets.
Relationship To Smoothing
The graph still uses local edges, so A* can produce stair-stepped paths. ../decisions/Post-A-Star Staircase Straightening.md documents why the first route-quality fix runs after A* instead of changing this graph construction flow.
continue:[[]]
before:[[]]