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

@turf/unkink-polygon

Package Overview
Dependencies
Maintainers
9
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/unkink-polygon

turf unkink-polygon module

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
662K
decreased by-18.57%
Maintainers
9
Weekly downloads
 
Created

What is @turf/unkink-polygon?

@turf/unkink-polygon is a module in the Turf.js library that is used to convert polygons with self-intersections (kinks) into simple polygons without self-intersections. This is useful for ensuring that polygon geometries are valid and can be used in various geospatial analyses.

What are @turf/unkink-polygon's main functionalities?

Unkink Polygon

This feature takes a polygon with self-intersections and returns a FeatureCollection of polygons without self-intersections. The code sample demonstrates how to use the `unkinkPolygon` function to process a polygon and output the resulting simple polygons.

const turf = require('@turf/turf');
const unkinkPolygon = require('@turf/unkink-polygon');

const polygon = turf.polygon([[
  [-12.034835, 8.901183],
  [-12.060413, 8.899826],
  [-12.03638, 8.873199],
  [-12.059383, 8.871418],
  [-12.034835, 8.901183]
]]);

const result = unkinkPolygon(polygon);
console.log(result);

Other packages similar to @turf/unkink-polygon

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