Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/voronoi

Package Overview
Dependencies
Maintainers
9
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/voronoi

turf voronoi module

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created

What is @turf/voronoi?

@turf/voronoi is a module within the Turf.js library that allows you to generate Voronoi diagrams from a set of points. Voronoi diagrams partition a plane into regions based on the distance to a specific set of points, which can be useful in various geospatial analyses.

What are @turf/voronoi's main functionalities?

Generate Voronoi Diagram

This feature allows you to generate a Voronoi diagram from a set of points. The code sample demonstrates how to create Voronoi polygons using a bounding box to limit the extent of the diagram.

const turf = require('@turf/turf');
const points = turf.points([
  [-75.343, 39.984],
  [-75.833, 39.284],
  [-75.534, 39.123],
  [-75.123, 39.567]
]);
const bbox = [-80, 30, -70, 50];
const voronoiPolygons = turf.voronoi(points, {bbox: bbox});
console.log(JSON.stringify(voronoiPolygons));

Other packages similar to @turf/voronoi

Keywords

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc