Skip to content

Instantly share code, notes, and snippets.

/* Stack-based Douglas Peucker line simplification routine
returned is a reduced GLatLng array
After code by Dr. Gary J. Robinson,
Environmental Systems Science Centre,
University of Reading, Reading, UK
*/
function GDouglasPeucker (source, kink)
/* source[] Input coordinates in GLatLngs */
/* kink in metres, kinks above this depth kept */