Last updated

API / geotoolkit / util / PolylineOptimizer / PolylineOptimizer

Class: PolylineOptimizer

util.PolylineOptimizer.PolylineOptimizer

This utility class performs a various line simplification algorithms

Deprecated

since 4.0

Table of contents

Constructors
Methods

Contents

Constructors

new PolylineOptimizer()

new PolylineOptimizer()

Methods

getClassName

getClassName(): string

Returns

string


filterByPrecision

Static filterByPrecision(x, y, tolerances, size, modelToDevice): [Float64Array, Float64Array, Float64Array, number, number[]]

Filters the unnecessary points using precision data from pre-computed Douglas-Peucker simplification values.

Deprecated

since 4.0

Parameters

Name Type Description
xnumber[] | Float64ArrayThe x-coordinates
ynumber[] | Float64ArrayThe y-coordinates
tolerancesFloat64ArrayThe tolerances array.
sizenumberThe number of points.
modelToDeviceTransformationThe model to device transform.

Returns

[Float64Array, Float64Array, Float64Array, number, number[]]

filteredResult The resulting filtered coordinates and size.


getClassName

Static getClassName(): string

Returns

string


reducePoints

Static reducePoints(x, y, size, tolerancesArray): void

Determines what points can be removed without compromising the polyline structure. (Douglas-Peucker algorithm)

Deprecated

since 4.0

Parameters

Name Type Description
xnumber[] | Float64ArrayThe x-coordinates of the points
ynumber[] | Float64ArrayThe y-coordinates of the points
sizenumberThe size of the coordinate arrays to use
tolerancesArraynumber[] | Float64ArrayThe tolerance limit

Returns

void