turf-kinks

turf kinks module

Turf packages are now namespaced: please use @turf/kinks instead
Last updated 4 years ago by tmcw .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install turf-kinks 
SYNC missed versions from official npm registry.

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

Current Tags

  • 3.0.7-canary.ae89c8b3                                ...           canary (4 years ago)
  • 3.0.12                                ...           latest (4 years ago)

14 Versions

  • 3.0.12 [deprecated]           ...           4 years ago
  • 3.0.10 [deprecated]           ...           4 years ago
  • 3.0.7-canary.ae89c8b3                                ...           4 years ago
  • 3.0.5 [deprecated]           ...           4 years ago
  • 3.0.1 [deprecated]           ...           4 years ago
  • 3.0.0-canary.7879bf6c                                ...           4 years ago
  • 3.0.0-canary.2f5f7167                                ...           4 years ago
  • 1.3.2 [deprecated]           ...           6 years ago
  • 1.3.1 [deprecated]           ...           6 years ago
  • 1.3.0 [deprecated]           ...           6 years ago
  • 1.2.1 [deprecated]           ...           6 years ago
  • 1.2.0 [deprecated]           ...           6 years ago
  • 1.1.0 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago
Downloads
Today 2
This Week 80
This Month 484
Last Day 40
Last Week 153
Last Month 711
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |