MatchedRoute

data class MatchedRoute(val distanceM: Double, val confidence: Double, val pointMatched: List<Boolean>, val legDistancesM: List<Double> = emptyList())

What a map-matching provider reported for one MatchRequest.

legDistancesM is per-leg distance between consecutive points in this response, one shorter than MatchPoint — the same shape as OSRM's matchings[].legs[].distance. It exists so TracePreparation.stitchMatchedDistanceM can drop exactly the legs a chunk overlap duplicated instead of guessing at a fraction of the chunk's aggregate distanceM. A RouteMatcher that cannot report it should leave it empty — TracePreparation.stitchMatchedDistanceM refuses loudly rather than silently mis-stitching.

confidence collapses toward zero on sparse or ambiguous traces — a real 3-point OSRM match returned 5.9e-05. Never branch on this value alone as "trustworthy"; that decision belongs to MatchReconciliation, which also has the client's own figure to weigh it against.

Constructors

Link copied to clipboard
constructor(distanceM: Double, confidence: Double, pointMatched: List<Boolean>, legDistancesM: List<Double> = emptyList())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Same length as the request's points; false where the provider called the point an outlier (OSRM: a null tracepoint).