simplify.js
function simplifyDouglasPeucker(points, sqTolerance) {
    var last = points.length - 1;

    var simplified = [points[0]];
    simplifyDPStep(points, 0, last, sqTolerance, simplified);
    simplified.push(points[last]);

    return simplified;
}
function simplifyDouglasPeucker(points, sqTolerance) {
    var last = points.length - 1;

    var simplified = [points[0]];
    simplifyDPStep(points, 0, last, sqTolerance, simplified);
    simplified.push(points[last]);

    return simplified;
}
function simplifyDouglasPeucker ( points , sqTolerance ) { var last = points . length - 1 ; var simplified = [ points [ 0 ] ] ; simplifyDPStep ( points , 0 , last , sqTolerance , simplified ) ; simplified . push ( points [ last ] ) ; return simplified ; }
simplification using Ramer-Douglas-Peucker algorithm
simplification using Ramer - Douglas - Peucker algorithm