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 | 坐标系 | 中心点 |
radius | number | 圆的半径 |
bearing1 | number | angle, in decimal degrees, of the first radius of the arc |
bearing2 | number | angle, in decimal degrees, of the second radius of the arc |
options? | 对象 | 可选参数(默认 ) |
options.steps? | number | number of steps (straight segments) that will constitute the arc (default 64) |
options.units? | string | miles, 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(...);