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

  1. src/app/zip-node-builder.js reads floors, geometry, walkable maps, kinds, nonwalkable maps, styles, and connections from a zip.
  2. Walkable polygons are sampled into graph candidate points.
  3. Narrow corridor polygons can also receive center-line nodes.
  4. Door bridge nodes are injected around door geometry.
  5. Candidate walk edges are built between nearby nodes when sampled blocker checks allow the segment.
  6. Connector edges are added for stairs, elevators, ramps, and escalators.
  7. 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:[[]]