mappymatch.matchers.valhalla#
Functions
|
builds a mappymatch MatchResult from the result of a Valhalla map matching request |
|
builds a mappymatch path from the result of a Valhalla map matching request |
Classes
|
pings a Valhalla server for map matching |
- mappymatch.matchers.valhalla.build_path_from_result(edges, shape)[source]#
builds a mappymatch path from the result of a Valhalla map matching request
- Return type:
List
[Road
]- Parameters:
edges (List[dict])
shape (List[Tuple[float, float]])
- mappymatch.matchers.valhalla.build_match_result(trace, matched_points, path)[source]#
builds a mappymatch MatchResult from the result of a Valhalla map matching request
- Return type:
- Parameters:
- class mappymatch.matchers.valhalla.ValhallaMatcher(valhalla_url='https://valhalla1.openstreetmap.de/trace_attributes', cost_model='auto', shape_match='map_snap', attributes={'edge.length', 'edge.speed'})[source]#
pings a Valhalla server for map matching
- match_trace(trace)[source]#
Take in a trace of gps points and return a list of matching link ids
- Return type:
- Parameters:
trace (Trace)
- Args:
trace: The trace to match
- Returns:
A list of Match objects
- match_trace_batch(trace_batch)[source]#
Take in a batch of traces and return a batch of matching link ids
- Return type:
list
[MatchResult
]- Parameters:
trace_batch (list[Trace])
- Args:
trace_batch: The batch of traces to match
- Returns:
A batch of Match objects