🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@turf/kinks

Package Overview
Dependencies
Maintainers
7
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/kinks

turf kinks module

7.0.0
Source
npm
Version published
Weekly downloads
691K
-4.45%
Maintainers
7
Weekly downloads
 
Created

What is @turf/kinks?

@turf/kinks is a module in the Turf.js library that is used to detect self-intersections (kinks) in GeoJSON polygons. This is useful for validating and cleaning up spatial data to ensure that polygons are well-formed and do not contain any self-intersecting lines.

What are @turf/kinks's main functionalities?

Detecting Kinks in Polygons

This feature allows you to detect self-intersections in a given GeoJSON polygon. The code sample creates a polygon with a self-intersection and uses the `turf.kinks` function to find and log the kinks.

const turf = require('@turf/turf');
const polygon = turf.polygon([[
  [-12.034835, 8.901183],
  [-12.060413, 8.899826],
  [-12.03638, 8.873199],
  [-12.034835, 8.901183]
]]);
const kinks = turf.kinks(polygon);
console.log(kinks);

Other packages similar to @turf/kinks

Keywords

turf

FAQs

Package last updated on 07 Jun 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