Package-level declarations

Functions

Link copied to clipboard
inline fun <T> List<T>.radialDistance(tolerance: Double, crossinline xExtractor: (T) -> Double, crossinline yExtractor: (T) -> Double, crossinline xTransformer: (Double) -> Double = { it }, crossinline yTransformer: (Double) -> Double = { it }): List<T>

Takes a list of objects representing a polyline with a xExtractor and yExtractor function and applies the Radial Distance (RD) algorithm returning the resulting list. This algorithm goes through each point and prunes points that are within the radial distance represented by tolerance param reducing the total number of points.

Link copied to clipboard
inline fun <T> List<T>.ramerDouglasPeucker(epsilon: Double, crossinline xExtractor: (T) -> Double, crossinline yExtractor: (T) -> Double, crossinline xTransformer: (Double) -> Double = { it }, crossinline yTransformer: (Double) -> Double = { it }): List<T>

Takes a list of objects representing a polyline with a xExtractor and yExtractor functions and applies the Ramer-Douglas-Peucker (RDP) algorithm returning the resulting list.