# polygonTangents

Finds the tangents of a (Multi)Polygon from a Point.
从一个点找到多边形的切线。

参数

参数 类型 描述
pt Coord 计算切点
polygon Feature <(Polygon|MultiPolygon)> 从...获取切线

返回

FeatureCollection <Point> - Feature Collection containing the two tangent points

示例

// 注意:polygon首尾坐标要一致
var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);
var point = turf.point([61, 5]);

var tangents = turf.polygonTangents(point, polygon)
Last Updated: 6/23/2023, 10:33:35 PM