vis-why
M Visvalingam and J D Whyatt line simplification algorithm Implementation based on Mike Bostock's code but without a d3 dependency.
Live demo is here
Installation
Install with component(1):
$ component install code42day/vis-why
Install with npm:
$ npm install vis-why
API
simplify(polyline, limit)
Simplify polyline by repeated elimination of the smallest area.
polyline
- array of points representing a polyline, each point represented by coordinate array[x, y]
limit
- number of points/vortexes that will remain in the resulting polyline
License
The MIT License (MIT)
Copyright (c) 2014 <code42day>