Simplifies a TaggedLineString, preserving topology (in the sense that no new intersections are introduced). Uses the recursive Douglas-Peucker algorithm.
More...
#include <TaggedLineStringSimplifier.h>
|
void | simplifySection (std::size_t i, std::size_t j, std::size_t depth) |
|
bool | hasBadIntersection (const TaggedLineString *parentLine, const std::pair< std::size_t, std::size_t > §ionIndex, const geom::LineSegment &candidateSeg) |
|
bool | hasBadInputIntersection (const TaggedLineString *parentLine, const std::pair< std::size_t, std::size_t > §ionIndex, const geom::LineSegment &candidateSeg) |
|
bool | hasBadOutputIntersection (const geom::LineSegment &candidateSeg) |
|
bool | hasInteriorIntersection (const geom::LineSegment &seg0, const geom::LineSegment &seg1) const |
|
std::unique_ptr< TaggedLineSegment > | flatten (std::size_t start, std::size_t end) |
|
void | remove (const TaggedLineString *line, std::size_t start, std::size_t end) |
| Remove the segs in the section of the line. More...
|
|
Simplifies a TaggedLineString, preserving topology (in the sense that no new intersections are introduced). Uses the recursive Douglas-Peucker algorithm.
Definition at line 63 of file TaggedLineStringSimplifier.h.
static std::size_t geos::simplify::TaggedLineStringSimplifier::findFurthestPoint |
( |
const geom::CoordinateSequence * |
pts, |
|
|
std::size_t |
i, |
|
|
std::size_t |
j, |
|
|
double & |
maxDistance |
|
) |
| |
|
staticprivate |
std::unique_ptr<TaggedLineSegment> geos::simplify::TaggedLineStringSimplifier::flatten |
( |
std::size_t |
start, |
|
|
std::size_t |
end |
|
) |
| |
|
private |
bool geos::simplify::TaggedLineStringSimplifier::hasBadInputIntersection |
( |
const TaggedLineString * |
parentLine, |
|
|
const std::pair< std::size_t, std::size_t > & |
sectionIndex, |
|
|
const geom::LineSegment & |
candidateSeg |
|
) |
| |
|
private |
bool geos::simplify::TaggedLineStringSimplifier::hasBadIntersection |
( |
const TaggedLineString * |
parentLine, |
|
|
const std::pair< std::size_t, std::size_t > & |
sectionIndex, |
|
|
const geom::LineSegment & |
candidateSeg |
|
) |
| |
|
private |
bool geos::simplify::TaggedLineStringSimplifier::hasBadOutputIntersection |
( |
const geom::LineSegment & |
candidateSeg | ) |
|
|
private |
static bool geos::simplify::TaggedLineStringSimplifier::isInLineSection |
( |
const TaggedLineString * |
parentLine, |
|
|
const std::pair< std::size_t, std::size_t > & |
sectionIndex, |
|
|
const TaggedLineSegment * |
seg |
|
) |
| |
|
staticprivate |
Tests whether a segment is in a section of a TaggedLineString.
- Parameters
-
parentLine | |
sectionIndex | |
seg | |
- Returns
void geos::simplify::TaggedLineStringSimplifier::remove |
( |
const TaggedLineString * |
line, |
|
|
std::size_t |
start, |
|
|
std::size_t |
end |
|
) |
| |
|
private |
Remove the segs in the section of the line.
- Parameters
-
void geos::simplify::TaggedLineStringSimplifier::setDistanceTolerance |
( |
double |
d | ) |
|
|
inline |
Sets the distance tolerance for the simplification.
All vertices in the simplified geometry will be within this distance of the original geometry.
- Parameters
-
d | the approximation tolerance to use |
Definition at line 157 of file TaggedLineStringSimplifier.h.
void geos::simplify::TaggedLineStringSimplifier::simplify |
( |
TaggedLineString * |
line | ) |
|
Simplifies the given TaggedLineString using the distance tolerance specified.
- Parameters
-
line | the linestring to simplify |
void geos::simplify::TaggedLineStringSimplifier::simplifySection |
( |
std::size_t |
i, |
|
|
std::size_t |
j, |
|
|
std::size_t |
depth |
|
) |
| |
|
private |
double geos::simplify::TaggedLineStringSimplifier::distanceTolerance |
|
private |
The documentation for this class was generated from the following file: