Skip to main content

Crate routers

Crate routers 

Source
Expand description
Banner

§

Routers is a set of routing tools designed for system-agnostic maps.

Test Format & Check Buf CI CodSpeed Badge

§Features

  • Map Matching
  • Point-to-Point Routing
  • Nearest Point (Pure or Snapped), Nearest Edge
  • … more to come.

Modules§

candidate
The candidate data model: the road positions a trajectory point may anchor to, and the results a match is expressed in.
codec
costing
Costing: the heuristics a match is priced by.
layer
matcher
The match lifecycle: a borrowed Matcher (configuration and operations) driving a caller-owned Trip (all mutable state).
network
primitives
Shared plumbing: errors, the routing context, hop geometry, and the reachability caches.
shard
transition
weigh
Weighing: filling a trellis’s pending boundaries with transition costs.

Structs§

LayerId
Index of a layer in a [Trellis].
MatchOptions
Configuration for a facade Match call.
Matcher
For orchestrating a map match, use the Matcher struct.
NodeId
Index of a node within a single layer.
Solved
A solved trellis: a Trellis paired with the minimum-cost Path through it.
Trellis
Layered graph where each layer is connected only to its adjacent layers.
TrellisPath
Result of a solve. nodes[t] is the chosen NodeId in layer t.

Enums§

Continuation
MatchError
The library error for the transition crate.

Traits§

Match
For matching a trajectory without assembling a Matcher yourself, use this facade — it is implemented for every Network.
MatchSimpleExt
Simplifies the interface to the Match trait, providing methods that uses appropriate options.