mapnik/mapnik — pull request #1385 by kkaefer (2012-08-14 18:46:28+00:00)
Title: Simplification of geometries using the Visvalingam-Whyatt algorithm

This is a first shot add adding a simplification vertex processor that uses the [Visvalingam-Whyatt](http://www2.dcs.hull.ac.uk/CISRG/publications/DPs/DP10/DP10.html) algorithm to simplify geometries based on its area measure. It adds the property `simplify-tolerance` to symbolizers (similar to how smoothing works). I chose `simplify-tolerance` so that we can use `simplify` for specifying the simplification algorithm should we implement more (e.g. a distance based simplification algorithm might be a lot faster and good enough for many tasks).

Marker symbolizers don't currently have the simplification in its chain because I'm not sure how that would work (they have smoothing enabled?)

The current implementation makes heavy use of `std::sort`. There are a few TODOs in the code that point towards possible optimizations. The current algorithm also doesn't take topology into account.