douglas-peucker

Returns a simplified version of a geometry formed by applying the Douglas-Peucker algorithm to each piece of line-work in the geometry.

The result will be a geometry that approximates the original geometry using fewer vertices. The line-work of the resulting geometry will lie entirely within the specified tolerance of the original geometry's line-work.

Parameter 1 - the geometry to be simplified.

Parameter 2 - the required tolerance (must be a positive number).

Returns: the simplified geometry.