turf voronoi module
Under Development - Not ready for use! Takes a set of Point|points and creates Voronoi Polygons, returned as a collection of Polygons. These are often used for partitioning in to regions called Voronoi cells.
parameter | type | description |
---|---|---|
points |
FeatureCollection.<Point> | input points |
// generate some random point data
var points = turf.random('points', 30, {
bbox: [50, 30, 70, 50]
});
var voronoi = turf.voronoi(points);
//=voronoi
Returns FeatureCollection.<Polygon>
, Voronoi output
Requires nodejs.
$ npm install turf-voronoi
$ npm test