The dp-simplify program acts to simplify polyline data using the algorithm of Douglas-Peucker. The program reads files containing the polyline’s vertices (specified as coordinate-pairs, separated by whitespace, one pair to a line), removes vertices up to a user-specified tolerance, and writes the simplified vertex-set in same format as the input.

Douglas-Peucker polyline simplification can result in a huge reduction in the number of vertices, saving storage and subsequent processing costs. Applications include data-reduction, cartography and the creation of client-side image maps.

The implementation of the Douglas-Peucker algorithm is largely based on that by Dan Sunday (cheers Dan).

example decimation