Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

turf-voronoi-polygons

stevage7MIT0.1.2

Unofficial Turf module to generate Voronoi polygons, using d3-voronoi.

readme

Turf-voronoi-polygons

This is an unofficial module for the Turf geospatial library, to generate Voronoi polygons from a set of points. It is a thin wrapper around the d3-voronoi library.

Definition: The Voronoi polygon for a point covers the area which is closer to this point than to any other.

https://en.wikipedia.org/wiki/Voronoi_diagram

Usage

var turf = require('turf');

var bbox = [143, -37.5, 145, -36];
var points = turf.random('points', 3000, { bbox: bbox });

turf.voronoi = require('turf-voronoi-polygons');
var polygons = turf.voronoi(points, bbox);