# RamerDouglasPeucker

Delphi **function** RamerDouglasPeucker(**const** path: TPath64; epsilon: double): TPath64;

Delphi **function** RamerDouglasPeucker(**const** paths: TPaths64; epsilon: double): TPaths64;

C++ **inline** Path<T> RamerDouglasPeucker(**const** Path<T>& path, double epsilon);

C++ **inline** Paths<T> RamerDouglasPeucker(**const** Paths<T>& path, double epsilon);

C# **public static** Path64 RamerDouglasPeucker(Path64 path, double epsilon);

C# **public static** Paths64 RamerDouglasPeucker(Paths64 path, double epsilon);

This function is based on an **algorithm** of the same name, and is very useful in removing extraneous path vertices. Somewhat simplistically, vertices will be removed when they are less than epsilon distance from an imaginary lines passing through their adjacent vertices. Logically, larger epsilon values will remove vertices more aggressively.

** While this function was previously recommended to tidy up paths following ****offsetting** (ie inflating/shrinking), it's no longer recommended for this. Instead the **SimplifyPaths** function is recommended because it's better suited when simplifying closed paths. (The *Ramer Douglas Peucker* algorithm was designed to simplify *open* paths, and has deficiencies when it's applied to closed paths.)

## See Also

InflatePaths, SimplifyPaths

Copyright © 2010-2023 Angus Johnson - Clipper2 1.2.2 - Help file built on 26 Mar 2023