simplify

fun LineString.simplify(tolerance: Double? = null, highestQuality: Boolean = false): LineString(source)

Reduces the number of points in a LineString while preserving its general shape.

Return

A new, simplified LineString.

Parameters

tolerance

The tolerance for simplification (in the units of the coordinates). A higher tolerance results in more simplification (fewer points). If null, a default tolerance of 1.0 is used.

highestQuality

If true, the radial distance simplification step is skipped, potentially resulting in a higher quality simplification at the cost of performance.