geos::simplify::DouglasPeuckerLineSimplifier Class Reference

Simplifies a linestring (sequence of points) using the standard Douglas-Peucker algorithm. More...

`#include <DouglasPeuckerLineSimplifier.h>`

## Public Member Functions

| DouglasPeuckerLineSimplifier (const geom::CoordinateSequence &nPts)
void | setDistanceTolerance (double nDistanceTolerance)
| Sets the distance tolerance for the simplification.
void | setPreserveClosedEndpoint (bool preserve)
| Sets whether the endpoint of a closed LineString should be preserved.
std::unique_ptr< geom::CoordinateSequence > | simplify ()
| Returns a newly allocated Coordinate vector, wrapped into an unique_ptr.

## Static Public Member Functions

static std::unique_ptr< geom::CoordinateSequence > | simplify (const geom::CoordinateSequence &nPts, double distanceTolerance, bool preserveClosedEndpoint)
| Returns a newly allocated Coordinate vector, wrapped into an unique_ptr.

## Detailed Description

Simplifies a linestring (sequence of points) using the standard Douglas-Peucker algorithm.

## Member Function Documentation

## setDistanceTolerance()

void geos::simplify::DouglasPeuckerLineSimplifier::setDistanceTolerance | ( | double | nDistanceTolerance | ) |

Sets the distance tolerance for the simplification.

All vertices in the simplified linestring will be within this distance of the original linestring.

Parameters

  nDistanceTolerance | the approximation tolerance to use

## setPreserveClosedEndpoint()

void geos::simplify::DouglasPeuckerLineSimplifier::setPreserveClosedEndpoint | ( | bool | preserve | ) |

Sets whether the endpoint of a closed LineString should be preserved.

Parameters

  preserve | true if the endpoint should be preserved

The documentation for this class was generated from the following file:

- DouglasPeuckerLineSimplifier.h