kinks
描述
🌐 Description
接受一个 linestring、multi-linestring、multi-polygon 或 polygon,并返回所有自相交点的 points。
🌐 Takes a linestring, multi-linestring, multi-polygon or polygon and returns points at all self-intersections.
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| featureIn | Feature<LineString | MultiLineString | MultiPolygon | Polygon> | 输入特性 |
返回
🌐 Returns
FeatureCollection<Point> self-intersections
示例
🌐 Examples
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);
安装
🌐 Installation
$ npm install @turf/kinks
import { kinks } from "@turf/kinks";
const result = kinks(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.kinks(...);