GEOS  3.13.0dev
Public Member Functions | Static Public Member Functions | List of all members
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< MultiLineStringsimplify (const MultiLineString *lines, double distanceTolerance)
 
static std::unique_ptr< MultiLineStringsimplify (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]

static 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
linesthe lines to simplify
distanceTolerancethe simplification tolerance
Returns
the simplified lines

◆ simplify() [2/2]

static 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
linesthe lines to simplify
freeRingsflags indicating which ring edges do not have node endpoints
constraintLinesthe linear constraints
distanceTolerancethe simplification tolerance
Returns
the simplified lines

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