# bearing

Takes two points and finds the geographic bearing between them, i.e. the angle measured in degrees from the north line (0 degrees)
取两点,找出它们之间的地理方位,即从北线(0度)开始测量的角度。

参数

参数 类型 描述
start Coord 开始点
end Coord 结束点
options Object 可选参数:见下文

options选项

属性 类型 默认值 描述
final boolean false 如果为真,则计算最终方位角

返回

number - bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)

示例

var point1 = turf.point([109.104262, 37.831315]);
var point2 = turf.point([102.865569, 34.089941]);

var bearing = turf.bearing(point1, point2);

npm install @turf/bearing

Last Updated: 6/21/2023, 11:40:17 PM