GEOS
3.9.1dev
|
Simplifies a linestring (sequence of points) using the standard Douglas-Peucker algorithm. More...
#include <DouglasPeuckerLineSimplifier.h>
Public Types | |
typedef std::vector< short int > | BoolVect |
typedef std::unique_ptr< BoolVect > | BoolVectAutoPtr |
typedef std::vector< geom::Coordinate > | CoordsVect |
typedef std::unique_ptr< CoordsVect > | CoordsVectAutoPtr |
Public Member Functions | |
DouglasPeuckerLineSimplifier (const CoordsVect &nPts) | |
void | setDistanceTolerance (double nDistanceTolerance) |
Sets the distance tolerance for the simplification. More... | |
CoordsVectAutoPtr | simplify () |
Returns a newly allocated Coordinate vector, wrapped into an unique_ptr. More... | |
Static Public Member Functions | |
static CoordsVectAutoPtr | simplify (const CoordsVect &nPts, double distanceTolerance) |
Returns a newly allocated Coordinate vector, wrapped into an unique_ptr. More... | |
Private Member Functions | |
void | simplifySection (std::size_t i, std::size_t j) |
DouglasPeuckerLineSimplifier (const DouglasPeuckerLineSimplifier &other)=delete | |
DouglasPeuckerLineSimplifier & | operator= (const DouglasPeuckerLineSimplifier &rhs)=delete |
Private Attributes | |
const CoordsVect & | pts |
BoolVectAutoPtr | usePt |
double | distanceTolerance |
Simplifies a linestring (sequence of points) using the standard Douglas-Peucker algorithm.
Definition at line 45 of file DouglasPeuckerLineSimplifier.h.
typedef std::vector<short int> geos::simplify::DouglasPeuckerLineSimplifier::BoolVect |
Definition at line 49 of file DouglasPeuckerLineSimplifier.h.
typedef std::unique_ptr<BoolVect> geos::simplify::DouglasPeuckerLineSimplifier::BoolVectAutoPtr |
Definition at line 50 of file DouglasPeuckerLineSimplifier.h.
typedef std::vector<geom::Coordinate> geos::simplify::DouglasPeuckerLineSimplifier::CoordsVect |
Definition at line 52 of file DouglasPeuckerLineSimplifier.h.
typedef std::unique_ptr<CoordsVect> geos::simplify::DouglasPeuckerLineSimplifier::CoordsVectAutoPtr |
Definition at line 53 of file DouglasPeuckerLineSimplifier.h.
geos::simplify::DouglasPeuckerLineSimplifier::DouglasPeuckerLineSimplifier | ( | const CoordsVect & | nPts | ) |
|
privatedelete |
|
privatedelete |
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.
nDistanceTolerance | the approximation tolerance to use |
|
static |
Returns a newly allocated Coordinate vector, wrapped into an unique_ptr.
CoordsVectAutoPtr geos::simplify::DouglasPeuckerLineSimplifier::simplify | ( | ) |
Returns a newly allocated Coordinate vector, wrapped into an unique_ptr.
|
private |
|
private |
Definition at line 86 of file DouglasPeuckerLineSimplifier.h.
|
private |
Definition at line 84 of file DouglasPeuckerLineSimplifier.h.
|
private |
Definition at line 85 of file DouglasPeuckerLineSimplifier.h.