GO-V.ORG
As seen in

Ramer–Douglas–Peucker algorithm

The Ramer–Douglas–Peucker algorithm, also known as the Douglas–Peucker algorithm and iterative end-point fit algorithm, is an algorithm that decimates a curve composed of line segments to a similar curve with fewer points. It was one of the earliest successful algorithms developed for cartographic generalization. It produces the most accurate generalization, but it is also more time-consuming. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

The Ramer–Douglas–Peucker algorithm, also known as the Douglas–Peucker algorithm and iterative end-point fit algorithm, is an algorithm that decimates a curve composed of line segments to a similar curve with fewer points. It was one of the earliest successful algorithms developed for cartographic generalization. It produces the most accurate generalization, but it is also more time-consuming. # source: https://karthaus.nl/rdp/ function DouglasPeucker(PointList[], epsilon) # Find the point with the maximum distance dmax = 0 index = 0 end = length(PointList) for i = 2 to (end - 1) { d = perpendicularDistance(PointList[i], Line(PointList[1], PointList[end])) if (d > dmax) { index = i dmax = d } } ResultList[] = empty; # If max distance is greater than epsilon, recursively simplify if (dmax > epsilon) { # Recursive call recResults1[] = DouglasPeucker(PointList[1...index], epsilon) recResults2[] = DouglasPeucker(PointList[index...end], epsilon) # Build the result list ResultList[] = {recResults1[1...length(recResults1) - 1], recResults2[1...length(recResults2)]} } else { ResultList[] = {PointList[1], PointList[end]} } # Return the result return ResultList[] ==Similar algorithms== ]] Alternative algorithms for line simplification include: Visvalingam–Whyatt Reumann–Witkam Opheim simplification Lang simplification Zhao–Saalfeld Imai-Iri ==External links== Boost.Geometry support Douglas–Peucker simplification algorithm Implementation of Ramer–Douglas–Peucker and many other simplification algorithms with open source licence in C++ XSLT implementation of the algorithm for use with KML data. You can see the algorithm applied to a GPS log from a bike ride at the bottom of this page Interactive visualization of the algorithm Implementation in F# Ruby gem implementation JTS, Java Topology Suite, contains Java implementation of many algorithms, including the Douglas-Peucker algorithm Rosetta Code (Implementations in many languages) 2D Polyline Simplification in CGAL, the Computational Geometry Algorithms Library. It simultaneously simplifies many curves with the guarantee not to introduce intersections

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Ramer–Douglas–Peucker algorithm". 1789396839. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1374882820

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·