Was happy to see this come across HN. I had bookmarked several notes and a PHP implementation of this. I am planning on using this to simplify the number of points defining a particular path on a google map, for a small preview map. Some of my data is > 1 meg for a long route, so trimming is important.<p>Check out a live PHP demo: <a href="http://www.fonant.com/demos/douglas_peucker/algorithm" rel="nofollow">http://www.fonant.com/demos/douglas_peucker/algorithm</a>