Douglas-Peucker Polygon Simplification
Simplify polylines and polygons by recursively discarding vertices whose perpendicular deviation from a chord falls below a chosen tolerance, using the Douglas-Peucker algorithm.
Tutorial
Introduction and Perpendicular Distance
In Live Air Routing, polygons describing airspace boundaries, restricted zones, and weather cells are often produced from rasterized satellite data and contain far more vertices than necessary for routing computation. The Douglas-Peucker algorithm simplifies such a polyline (and by extension, a closed polygon) by discarding vertices whose perpendicular deviation from a chord falls below a chosen tolerance
The basic subroutine is the perpendicular distance from a point to the line through and
The numerator is the magnitude of the 2D cross product which equals twice the area of triangle The denominator is the length of the chord
For example, with and