Simplify

open class Simplify
  • Returns an array of simplified points

    Declaration

    Swift

    open class func simplify<T>(_ points: [T], tolerance: Float?, highQuality: Bool = false) -> [T] where T : SimplifyValue

    Parameters

    points

    An array of points

    tolerance

    Affects the amount of simplification (in the same metric as the point coordinates)

    highQuality

    Excludes distance-based preprocessing step which leads to highest quality simplification but runs ~10-20 times slower

    Return Value

    Returns an array of simplified points