Line Simplification

Recursive Douglas-Peucker Polyline Simplification (Iterative Endpoint Fit)

Download
Download

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Cite As

Wolfgang Schwanghart (2026). Line Simplification (https://se.mathworks.com/matlabcentral/fileexchange/21132-line-simplification), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: Region Growing (2D/3D grayscale)

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.4.0

added m-file that runs with GNU Octave

Download
1.3.0

Added some information in the description.

Download
1.2.0

Removed a bug in calculating the second output argument. Improved handling of lines with only one segment.

Download
1.1.0

only minor changes: added some comments and changed the link to more information since it was dead.

Download
1.0.0

First, the algorithm can now handle nans in the vertex array. It assumes that nans in the array serve as separator of single polylines and treats each polyline/polygon separately.

Download