Skip to content

spatial-monorepo


spatial-monorepo / ui/src / buildExcludedEdgeIds

Function: buildExcludedEdgeIds()

buildExcludedEdgeIds(graph, obstacles): Set<string>

Defined in: packages/ui/src/useWayfinding.ts:105

Pre-compute the set of edge IDs that cross any obstacle polygon. An edge is blocked when its midpoint falls inside an obstacle. This is called once at graph+obstacle build time, not per route call.

Parameters

graph

WayfindingGraph

obstacles

ObstaclePolygon[]

Returns

Set<string>

Released under commercial licensing.