geos::coverage::TPVWSimplifier Class Reference

`#include <TPVWSimplifier.h>`

## Public Member Functions

| TPVWSimplifier (const MultiLineString *lines, double distanceTolerance)

## Static Public Member Functions

static std::unique_ptr< MultiLineString > | simplify (const MultiLineString *lines, double distanceTolerance)
static std::unique_ptr< MultiLineString > | simplify (const MultiLineString *lines, std::vector< bool > &freeRings, const MultiLineString *constraintLines, double distanceTolerance)

## Detailed Description

Computes a Topology-Preserving Visvalingam-Whyatt simplification of a set of input lines. The simplified lines will contain no more intersections than are present in the original input. Line and ring endpoints are preserved, except for rings which are flagged as "free".

The amount of simplification is determined by a tolerance value, which is a non-zero quantity. It is the square root of the area tolerance used in the Visvalingam-Whyatt algorithm. This equates roughly to the maximum distance by which a simplified line can change from the original.

Author
  mdavis

## Member Function Documentation

## simplify() [1/2]

std::unique_ptr< MultiLineString > geos::coverage::TPVWSimplifier::simplify | ( | const MultiLineString * | lines,
|  | double | distanceTolerance )

static

Simplifies a set of lines, preserving the topology of the lines.

Parameters

  lines | the lines to simplify
  distanceTolerance | the simplification tolerance

Returns
  the simplified lines

Referenced by simplify().

## simplify() [2/2]

std::unique_ptr< MultiLineString > geos::coverage::TPVWSimplifier::simplify | ( | const MultiLineString * | lines,
|  | std::vector< bool > & | freeRings,
|  | const MultiLineString * | constraintLines,
|  | double | distanceTolerance )

static

Simplifies a set of lines, preserving the topology of the lines between themselves and a set of linear constraints. The endpoints of lines are preserved. The endpoint of rings are preserved as well, unless the ring is indicated as "free" via a bit flag with the same index.

Parameters

  lines | the lines to simplify
  freeRings | flags indicating which ring edges do not have node endpoints
  constraintLines | the linear constraints
  distanceTolerance | the simplification tolerance

Returns
  the simplified lines

References simplify().

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

- TPVWSimplifier.h