Skip to content

KBE3D / KBCore / turf / kinks

函数: kinks()

kinks<T>(featureIn: T | Feature<T, GeoJsonProperties>): FeatureCollection<Point>

Function

Takes a linestring, multi-linestring, multi-polygon or polygon and returns points at all self-intersections.

类型参数

T

T extends LineString | MultiLineString | Polygon | MultiPolygon

参数

featureIn

input feature

T | Feature<T, GeoJsonProperties>

返回

FeatureCollection<Point>

self-intersections

示例

ts
var poly = turf.polygon([[
  [-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);

//addToMap
var addToMap = [poly, kinks]

KBE3D @3.0.0 Copyright © 2024-present KBE3D