Appearance
函数: 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>
返回
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]