turf-kinks

WebJar for turf-kinks

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

turf-kinks
Last Version

Last Version

3.0.12
Release Date

Release Date

Type

Type

jar
Description

Description

turf-kinks
WebJar for turf-kinks
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/turf-junkyard/turf-kinks

Download turf-kinks

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/turf-kinks/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>turf-kinks</artifactId>
    <version>3.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/turf-kinks/
implementation 'org.webjars.npm:turf-kinks:3.0.12'
// https://jarcasting.com/artifacts/org.webjars.npm/turf-kinks/
implementation ("org.webjars.npm:turf-kinks:3.0.12")
'org.webjars.npm:turf-kinks:jar:3.0.12'
<dependency org="org.webjars.npm" name="turf-kinks" rev="3.0.12">
  <artifact name="turf-kinks" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='turf-kinks', version='3.0.12')
)
libraryDependencies += "org.webjars.npm" % "turf-kinks" % "3.0.12"
[org.webjars.npm/turf-kinks "3.0.12"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : turf-helpers jar [3.0.12,4)

Project Modules

There are no modules declared in this project.

turf-kinks

build status

turf kinks module

turf.kinks(polygon)

Takes a Polygon|polygon and returns Point|points at all self-intersections.

Parameters

parameter type description
polygon Feature.<Polygon> input polygon

Example

var poly = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-12.034835, 8.901183],
      [-12.060413, 8.899826],
      [-12.03638, 8.873199],
      [-12.059383, 8.871418],
      [-12.034835, 8.901183]
    ]]
  }
};

var kinks = turf.kinks(poly);

var resultFeatures = kinks.intersections.features.concat(poly);
var result = {
  "type": "FeatureCollection",
  "features": resultFeatures
};

//=result

Returns FeatureCollection.<Point>, self-intersections

Installation

Requires nodejs.

$ npm install turf-kinks

Tests

$ npm test
org.webjars.npm

deprecated turf modules: do not use or reference, for redirects only

turf is now a monorepo: all turf modules are in Turfjs/turf

Versions

Version
3.0.12