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

@turf/concave

Package Overview
Dependencies
Maintainers
9
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/concave

turf concave module

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
697K
increased by27.86%
Maintainers
9
Weekly downloads
 
Created

What is @turf/concave?

@turf/concave is a module within the Turf.js library that allows you to generate concave hull polygons from a set of points. This can be useful for creating boundaries that more closely fit the shape of the input points compared to convex hulls.

What are @turf/concave's main functionalities?

Generate Concave Hull

This feature allows you to generate a concave hull polygon from a set of points. The `maxEdge` parameter controls the maximum length of an edge in the hull, which influences the 'concaveness' of the resulting polygon.

const turf = require('@turf/turf');

const points = turf.featureCollection([
  turf.point([10, 10]),
  turf.point([20, 20]),
  turf.point([30, 10]),
  turf.point([40, 40]),
  turf.point([50, 30])
]);

const concaveHull = turf.concave(points, {maxEdge: 25});

console.log(JSON.stringify(concaveHull));

Other packages similar to @turf/concave

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