GEOS 3.14.0dev
|
#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) |
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.
|
static |
Simplifies a set of lines, preserving the topology of the lines.
lines | the lines to simplify |
distanceTolerance | the simplification tolerance |
|
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.
lines | the lines to simplify |
freeRings | flags indicating which ring edges do not have node endpoints |
constraintLines | the linear constraints |
distanceTolerance | the simplification tolerance |