LineSimplification

abstract class LineSimplification<T : Any>

Based on simplification in

https://github.com/mapbox/mapbox-java/blob/cf7d7bfd8b74835a623fb0bc9e064e3b86aa2ccc/services-geojson/src/main/java/com/mapbox/geojson/utils/PolylineUtils.java

Constructors

Link copied to clipboard
fun LineSimplification()

Functions

Link copied to clipboard
fun simplify(points: List<T>, highestQuality: Boolean): List<T>
fun simplify(points: List<T>, tolerance: Double = SIMPLIFY_DEFAULT_TOLERANCE, highestQuality: Boolean = SIMPLIFY_DEFAULT_HIGHEST_QUALITY): List<T>

Reduces the number of points in a polyline while retaining its shape, giving a performance boost when processing it and also reducing visual noise.

Inheritors

Link copied to clipboard