mappymatch.matchers.lcss.lcss#

Classes

LCSSMatcher(road_map[, distance_epsilon, ...])

A map matcher based on the paper:

class mappymatch.matchers.lcss.lcss.LCSSMatcher(road_map, distance_epsilon=50.0, similarity_cutoff=0.9, cutting_threshold=10.0, random_cuts=0, distance_threshold=10000)[source]#

A map matcher based on the paper:

Zhu, Lei, Jacob R. Holden, and Jeffrey D. Gonder. "Trajectory Segmentation Map-Matching Approach for Large-Scale, High-Resolution GPS Data." Transportation Research Record: Journal of the Transportation Research Board 2645 (2017): 67-75.

Args:

road_map: The road map to use for matching distance_epsilon: The distance epsilon to use for matching (default: 50 meters) similarity_cutoff: The similarity cutoff to use for stopping the algorithm (default: 0.9) cutting_threshold: The distance threshold to use for computing cutting points (default: 10 meters) random_cuts: The number of random cuts to add at each iteration (default: 0) distance_threshold: The distance threshold above which no match is made (default: 10000 meters)

Parameters:
  • road_map (MapInterface)

  • distance_epsilon (float)

  • similarity_cutoff (float)

  • cutting_threshold (float)

  • random_cuts (int)

  • distance_threshold (float)

match_trace(trace)[source]#

Take in a trace of gps points and return a list of matching link ids

Return type:

MatchResult

Parameters:

trace (Trace)

Args:

trace: The trace to match

Returns:

A list of Match objects

match_trace_batch(trace_batch, processes=1)[source]#

Take in a batch of traces and return a batch of matching link ids

Return type:

List[MatchResult]

Parameters:
  • trace_batch (List[Trace])

  • processes (int)

Args:

trace_batch: The batch of traces to match

Returns:

A batch of Match objects