Root namespace of the polyline simplification library. More...
Namespaces | |
math | |
Contains functions for calculating statistics and distances between various geometric entities. | |
util | |
Contains utility functions and classes. | |
Classes | |
class | PolylineSimplification |
Provides various simplification algorithms for n-dimensional simple polylines. More... | |
Functions | |
template<unsigned DIM, class ForwardIterator > | |
math::Statistics | compute_positional_error_statistics (ForwardIterator original_first, ForwardIterator original_last, ForwardIterator simplified_first, ForwardIterator simplified_last, bool *valid=0) |
Computes statistics for the positional errors between a polyline and its simplification. More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | compute_positional_errors2 (ForwardIterator original_first, ForwardIterator original_last, ForwardIterator simplified_first, ForwardIterator simplified_last, OutputIterator result, bool *valid=0) |
Computes the squared positional error between a polyline and its simplification. More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_douglas_peucker (ForwardIterator first, ForwardIterator last, typename std::iterator_traits< ForwardIterator >::value_type tol, OutputIterator result) |
Performs Douglas-Peucker polyline simplification (DP). More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_douglas_peucker_n (ForwardIterator first, ForwardIterator last, unsigned count, OutputIterator result) |
Performs a variant of Douglas-Peucker polyline simplification (DPn). More... | |
template<unsigned DIM, class BidirectionalIterator , class OutputIterator > | |
OutputIterator | simplify_lang (BidirectionalIterator first, BidirectionalIterator last, typename std::iterator_traits< BidirectionalIterator >::value_type tol, unsigned look_ahead, OutputIterator result) |
Performs Lang polyline simplification (LA). More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_nth_point (ForwardIterator first, ForwardIterator last, unsigned n, OutputIterator result) |
Performs the nth point routine (NP). More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_opheim (ForwardIterator first, ForwardIterator last, typename std::iterator_traits< ForwardIterator >::value_type min_tol, typename std::iterator_traits< ForwardIterator >::value_type max_tol, OutputIterator result) |
Performs Opheim polyline simplification (OP). More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_perpendicular_distance (ForwardIterator first, ForwardIterator last, typename std::iterator_traits< ForwardIterator >::value_type tol, unsigned repeat, OutputIterator result) |
Repeatedly performs the perpendicular distance routine (PD). More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_perpendicular_distance (ForwardIterator first, ForwardIterator last, typename std::iterator_traits< ForwardIterator >::value_type tol, OutputIterator result) |
Performs the perpendicular distance routine (PD). More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_radial_distance (ForwardIterator first, ForwardIterator last, typename std::iterator_traits< ForwardIterator >::value_type tol, OutputIterator result) |
Performs the (radial) distance between points routine (RD). More... | |
template<unsigned DIM, class ForwardIterator , class OutputIterator > | |
OutputIterator | simplify_reumann_witkam (ForwardIterator first, ForwardIterator last, typename std::iterator_traits< ForwardIterator >::value_type tol, OutputIterator result) |
Performs Reumann-Witkam polyline simplification (RW). More... | |
Root namespace of the polyline simplification library.
math::Statistics psimpl::compute_positional_error_statistics | ( | ForwardIterator | original_first, |
ForwardIterator | original_last, | ||
ForwardIterator | simplified_first, | ||
ForwardIterator | simplified_last, | ||
bool * | valid = 0 |
||
) |
Computes statistics for the positional errors between a polyline and its simplification.
This is a convenience function that provides template type deduction for PolylineSimplification::ComputePositionalErrorStatistics.
[in] | original_first | the first coordinate of the first polyline point |
[in] | original_last | one beyond the last coordinate of the last polyline point |
[in] | simplified_first | the first coordinate of the first simplified polyline point |
[in] | simplified_last | one beyond the last coordinate of the last simplified polyline point |
[out] | valid | [optional] indicates if the computed statistics are valid |
OutputIterator psimpl::compute_positional_errors2 | ( | ForwardIterator | original_first, |
ForwardIterator | original_last, | ||
ForwardIterator | simplified_first, | ||
ForwardIterator | simplified_last, | ||
OutputIterator | result, | ||
bool * | valid = 0 |
||
) |
Computes the squared positional error between a polyline and its simplification.
This is a convenience function that provides template type deduction for PolylineSimplification::ComputePositionalErrors2.
[in] | original_first | the first coordinate of the first polyline point |
[in] | original_last | one beyond the last coordinate of the last polyline point |
[in] | simplified_first | the first coordinate of the first simplified polyline point |
[in] | simplified_last | one beyond the last coordinate of the last simplified polyline point |
[in] | result | destination of the squared positional errors |
[out] | valid | [optional] indicates if the computed positional errors are valid |
OutputIterator psimpl::simplify_douglas_peucker | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
typename std::iterator_traits< ForwardIterator >::value_type | tol, | ||
OutputIterator | result | ||
) |
Performs Douglas-Peucker polyline simplification (DP).
This is a convenience function that provides template type deduction for PolylineSimplification::DouglasPeucker.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | tol | perpendicular (point-to-segment) distance tolerance |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_douglas_peucker_n | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
unsigned | count, | ||
OutputIterator | result | ||
) |
Performs a variant of Douglas-Peucker polyline simplification (DPn).
This is a convenience function that provides template type deduction for PolylineSimplification::DouglasPeuckerAlt.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | count | the maximum number of points of the simplified polyline |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_lang | ( | BidirectionalIterator | first, |
BidirectionalIterator | last, | ||
typename std::iterator_traits< BidirectionalIterator >::value_type | tol, | ||
unsigned | look_ahead, | ||
OutputIterator | result | ||
) |
Performs Lang polyline simplification (LA).
This is a convenience function that provides template type deduction for PolylineSimplification::Lang.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | tol | perpendicular (point-to-segment) distance tolerance |
[in] | look_ahead | defines the size of the search region |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_nth_point | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
unsigned | n, | ||
OutputIterator | result | ||
) |
Performs the nth point routine (NP).
This is a convenience function that provides template type deduction for PolylineSimplification::NthPoint.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | n | specifies 'each nth point' |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_opheim | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
typename std::iterator_traits< ForwardIterator >::value_type | min_tol, | ||
typename std::iterator_traits< ForwardIterator >::value_type | max_tol, | ||
OutputIterator | result | ||
) |
Performs Opheim polyline simplification (OP).
This is a convenience function that provides template type deduction for PolylineSimplification::Opheim.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | min_tol | minimum distance tolerance |
[in] | max_tol | maximum distance tolerance |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_perpendicular_distance | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
typename std::iterator_traits< ForwardIterator >::value_type | tol, | ||
unsigned | repeat, | ||
OutputIterator | result | ||
) |
Repeatedly performs the perpendicular distance routine (PD).
This is a convenience function that provides template type deduction for PolylineSimplification::PerpendicularDistance.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | tol | perpendicular (segment-to-point) distance tolerance |
[in] | repeat | the number of times to successively apply the PD routine. |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_perpendicular_distance | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
typename std::iterator_traits< ForwardIterator >::value_type | tol, | ||
OutputIterator | result | ||
) |
Performs the perpendicular distance routine (PD).
This is a convenience function that provides template type deduction for PolylineSimplification::PerpendicularDistance.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | tol | perpendicular (segment-to-point) distance tolerance |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_radial_distance | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
typename std::iterator_traits< ForwardIterator >::value_type | tol, | ||
OutputIterator | result | ||
) |
Performs the (radial) distance between points routine (RD).
This is a convenience function that provides template type deduction for PolylineSimplification::RadialDistance.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | tol | radial (point-to-point) distance tolerance |
[in] | result | destination of the simplified polyline |
OutputIterator psimpl::simplify_reumann_witkam | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
typename std::iterator_traits< ForwardIterator >::value_type | tol, | ||
OutputIterator | result | ||
) |
Performs Reumann-Witkam polyline simplification (RW).
This is a convenience function that provides template type deduction for PolylineSimplification::ReumannWitkam.
[in] | first | the first coordinate of the first polyline point |
[in] | last | one beyond the last coordinate of the last polyline point |
[in] | tol | perpendicular (point-to-line) distance tolerance |
[in] | result | destination of the simplified polyline |