mappymatch.matchers.lcss.ops#
Functions
|
Takes a set of matches and adds duplicate match entries for stationary |
|
Drops stationary points from the trace, keeping the first point |
|
Find the positional index of all stationary points in a trace |
|
Computes a shortest path and returns the path |
|
Compares two trajectory schemes for equality |
|
Splits a trajectory segment based on the provided cutting points. |
Classes
|
An index of a stationary point in a trajectory |
- mappymatch.matchers.lcss.ops.new_path(road_map, trace)[source]#
Computes a shortest path and returns the path
- Return type:
List
[Road
]- Parameters:
road_map (MapInterface)
trace (Trace)
- Args:
road_map: the road map to match to trace: the trace to match
- Returns:
the path that most closely matches the trace
- mappymatch.matchers.lcss.ops.split_trajectory_segment(road_map, trajectory_segment)[source]#
Splits a trajectory segment based on the provided cutting points.
Merge back any segments that are too short
- Return type:
List
[TrajectorySegment
]- Parameters:
road_map (MapInterface)
trajectory_segment (TrajectorySegment)
- Args:
road_map: the road map to match to trajectory_segment: the trajectory segment to split distance_epsilon: the distance epsilon
- Returns:
a list of split segments or the original segment if it can't be split
- mappymatch.matchers.lcss.ops.same_trajectory_scheme(scheme1, scheme2)[source]#
Compares two trajectory schemes for equality
- Return type:
bool
- Parameters:
scheme1 (List[TrajectorySegment])
scheme2 (List[TrajectorySegment])
- Args:
scheme1: the first trajectory scheme scheme2: the second trajectory scheme
- Returns:
True if the two schemes are equal, False otherwise
- class mappymatch.matchers.lcss.ops.StationaryIndex(i_index: List[int], c_index: List[Any])[source]#
An index of a stationary point in a trajectory
- Attributes:
trace_index: the index of the trace coord_index: the index of the coordinate
- Parameters:
i_index (List[int])
c_index (List[Any])
-
i_index:
List
[int
]# Alias for field number 0
-
c_index:
List
[Any
]# Alias for field number 1
- mappymatch.matchers.lcss.ops.find_stationary_points(trace)[source]#
Find the positional index of all stationary points in a trace
- Return type:
List
[StationaryIndex
]- Parameters:
trace (Trace)
- Args:
trace: the trace to find the stationary points in
- Returns:
a list of stationary indices
- mappymatch.matchers.lcss.ops.drop_stationary_points(trace, stationary_index)[source]#
Drops stationary points from the trace, keeping the first point
- Return type:
- Parameters:
trace (Trace)
stationary_index (List[StationaryIndex])
- Args:
trace: the trace to drop the stationary points from stationary_index: the stationary indices to drop
- Returns:
the trace with the stationary points dropped
- mappymatch.matchers.lcss.ops.add_matches_for_stationary_points(matches, stationary_index)[source]#
Takes a set of matches and adds duplicate match entries for stationary
- Return type:
List
[Match
]- Parameters:
matches (List[Match])
stationary_index (List[StationaryIndex])
- Args:
matches: the matches to add the stationary points to stationary_index: the stationary indices to add
- Returns:
the matches with the stationary points added