Skip to main content
Version: Next

lineArc

描述

¥Description

Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2;0 方位角表示中心点以北,顺时针为正方向。

¥Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; 0 bearing is North of center point, positive clockwise.

参数

¥Parameters

名称类型描述
center坐标系中心点
radiusnumber圆的半径
bearing1numberangle, in decimal degrees, of the first radius of the arc
bearing2numberangle, in decimal degrees, of the second radius of the arc
options?对象可选参数(默认
options.steps?numbernumber of steps (straight segments) that will constitute the arc (default 64)
options.units?stringmiles, kilometers, degrees, or radians (default 'kilometers')

返回

¥Returns

特性<LineString> 线弧

¥Feature<LineString> line arc

示例

¥Examples

var center = turf.point([-75, 40]);
var radius = 5;
var bearing1 = 25;
var bearing2 = 47;

var arc = turf.lineArc(center, radius, bearing1, bearing2);

安装

¥Installation

$ npm install @turf/line-arc

import { lineArc } from "@turf/line-arc";
const result = lineArc(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.lineArc(...);