I think I have posted something about Douglas-Peucker algorithm, to reduce the number of vertices of a polyline.
Polyline simplification is the process of reducing the resolution of a polyline, achieved by removing vertices and edges, while maintaining a good approximation of the original curve. In the end is a compromise between waste of resources and level of detail-the resolution of the polyline-. There are some algorithms you can recall to:
Simplification algorithms
- Nth point – A naive algorithm that keeps only each nth point
- Distance between points – Removes successive points that are clustered together
- Perpendicular distance – Removes points based on their distance to the line segment defined by their left and right neighbors
- Reumann-Witkam – Shifts a strip along the polyline and removes points that fall outside
- Opheim – Similar to Reumann-Witkam, but constrains the search area using a minimum and maximum tolerance
- Lang – Similar to the Perpendicular distance routine, but instead of looking only at direct neighbors, an entire search region is processed
- Douglas-Peucker – A classic simplification algorithm that provides an excellent approximation of the original line
- Positional errors – Distance of each point from an original polyline to its simplification