SimplifyLinestring Module
Module Contents
-
template<typename point_type>
struct simplify_linestring Public Static Functions
-
template<typename linestring_type>
static inline void apply(linestring_type const &input, linestring_type &output, double error_tolerance)
-
template<typename linestring_type>
-
template<typename linestring_type>
linestring_type tracktable::simplify(linestring_type const &input, double tolerance) Geometric simplification for trajectory
This function reduces the number of points in a trajectory without introducing positional error greater than the supplied tolerance. Under the hood it uses Douglas-Peucker simplification.
NOTE: The points in the output are copies of the points in the input. Changing the input after a call to simplify() will have no effect on previous results.
NOTE: This function only cares about geometric error in the trajectory. It does not account for error in the attributes attached to each point.
- Parameters:
input – [in] Trajectory to simplify
tolerance – [in] Error tolerance measured in the trajectory’s native distance
- Returns:
Simplified version of trajectory