This is a simplification algorithm, in other words, it seeks to reduce the number of points existing on a polyline.
It is based on the search for critical points starting off from a linear tolerance. The critical points, which will form the simplified line, will be those which progressively attain a greater perpendicular distance with respect to the base line considered that is always greater than the tolerance imposed.
The first base line will be formed between the first (anchoring) and last (floating) points of the original line. Then the perpendicular distances from all intermediate points will be calculated:
· If none of these distances is greater than tolerance, the simplification will have come to an end with only the line’s initial and final points being retained.
· Should tolerance be exceeded, the point furthest away will be retained as the critical point that will subdivide the original line into two sections. In each of those sections, the process will be repeated as if they were two independent lines and the process will continue thus until there is no need to further subdivide the line.
Scheme of operation of the Douglas- Peucker algorithm.
Once the command has been run, MDT will request the polylines that are to be modified. It will then request the scale of the drawing. In accordance with this scale, it will propose a value for tolerance, which users may later modify.
How the algorithm works by applying different tolerance values can be seen below.