mappymatch.utils.process_trace

mappymatch.utils.process_trace#

Functions

remove_bad_start_from_trace(trace, ...)

Remove points at the beginning of a trace if it is a gap is too big.

split_large_trace(trace, ideal_size)

Split up a trace into a list of smaller traces.

mappymatch.utils.process_trace.split_large_trace(trace, ideal_size)[source]#

Split up a trace into a list of smaller traces.

Return type:

list[Trace]

Parameters:
  • trace (Trace)

  • ideal_size (int)

Args:

trace: the trace to split. ideal_size: the target number of coordinates for each new trace.

Returns:

A list of split traces.

mappymatch.utils.process_trace.remove_bad_start_from_trace(trace, distance_threshold)[source]#

Remove points at the beginning of a trace if it is a gap is too big.

Too big is defined by distance threshold.

Return type:

Trace

Parameters:
  • trace (Trace)

  • distance_threshold (float)

Args:

trace: The trace. distance_threshold: The distance threshold.

Returns:

The new trace.