Classes | Static Public Member Functions | Static Private Member Functions | List of all members
psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper Class Reference

Douglas-Peucker approximation helper class. More...

Classes

struct  KeyInfo
 Defines the key of a polyline. More...
 
struct  SubPoly
 Defines a sub polyline. More...
 
struct  SubPolyAlt
 Defines a sub polyline including its key. More...
 

Static Public Member Functions

static void Approximate (const value_type *coords, ptr_diff_type coordCount, value_type tol, unsigned char *keys)
 Performs Douglas-Peucker approximation. More...
 
static void ApproximateN (const value_type *coords, ptr_diff_type coordCount, unsigned countTol, unsigned char *keys)
 Performs Douglas-Peucker approximation. More...
 

Static Private Member Functions

static KeyInfo FindKey (const value_type *coords, ptr_diff_type first, ptr_diff_type last)
 Finds the key for the given sub polyline. More...
 

Detailed Description

template<unsigned DIM, class InputIterator, class OutputIterator>
class psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper

Douglas-Peucker approximation helper class.

Contains helper implentations for Douglas-Peucker approximation that operate solely on value_type arrays and value_type pointers. Note that the PolylineSimplification class only operates on iterators.

Definition at line 1457 of file psimpl.h.

Member Function Documentation

◆ Approximate()

template<unsigned DIM, class InputIterator, class OutputIterator>
static void psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper::Approximate ( const value_type coords,
ptr_diff_type  coordCount,
value_type  tol,
unsigned char *  keys 
)
inlinestatic

Performs Douglas-Peucker approximation.

Parameters
[in]coordsarray of polyline coordinates
[in]coordCountnumber of coordinates in coords []
[in]tolapproximation tolerance
[out]keysindicates for each polyline point if it is a key

Definition at line 1500 of file psimpl.h.

◆ ApproximateN()

template<unsigned DIM, class InputIterator, class OutputIterator>
static void psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper::ApproximateN ( const value_type coords,
ptr_diff_type  coordCount,
unsigned  countTol,
unsigned char *  keys 
)
inlinestatic

Performs Douglas-Peucker approximation.

Parameters
[in]coordsarray of polyline coordinates
[in]coordCountnumber of coordinates in coords []
[in]countTolpoint count tolerance
[out]keysindicates for each polyline point if it is a key

Definition at line 1541 of file psimpl.h.

◆ FindKey()

template<unsigned DIM, class InputIterator, class OutputIterator>
static KeyInfo psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper::FindKey ( const value_type coords,
ptr_diff_type  first,
ptr_diff_type  last 
)
inlinestaticprivate

Finds the key for the given sub polyline.

Finds the point in the range [first, last] that is furthest away from the segment (first, last). This point is called the key.

Parameters
[in]coordsarray of polyline coordinates
[in]firstthe first coordinate of the first polyline point
[in]lastthe first coordinate of the last polyline point
Returns
the index of the key and its distance, or last when a key could not be found

Definition at line 1602 of file psimpl.h.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:12