lineArc
函数可以通过指定的圆心、半径、起始角度和终止角度,创建一段弧线段在给定的投影中。
center
(数组类型): 弧线段的圆心坐标,格式为[经度,纬度],必填项。radius
(数字类型): 弧线段的半径大小,单位为米,必填项。startBearing
(数字类型): 弧线段的起始角度,北极点为0度,顺时针旋转,字符型的度数数值或者数值型的角度,必填项。endBearing
(数字类型): 弧线段的终止角度,与起始角度方向相同,字符型的度数数值或者数值型的角度,必填项。options
(对象类型): 可选项,其中可以包含以下参数:
steps
(数字类型): 表示每个拐点之间插入点的数量,插值生成流条线段。默认值为10.var center = [121.369, 31.234];
var radius = 100000;
var startBearing = 0;
var endBearing = 90;
var options = {steps: 10};
var arc = turf.lineArc(center, radius, startBearing, endBearing, options);
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [[121.36900000000444,31.234089217374614],[121.36690105341331,31.235157342340533],[121.36607189608036,31.23576591291903],[121.36529239862147,31.236371361542024],[121.3637881900706,31.236875362134946],[121.36181861161307,31.23714533715367],[121.36009563842783,31.237145104376915],[121.35837266494508,31.237144871600282],[121.35640309260004,31.236874908964757],[121.35489895936986,31.23637109146444],[121.35411946202,31.23576508174073],[121.35328980466881,31.235156597623005],[121.35141691578596,31.23385815452211],[121.35018439109242,31.232585841793703],[121.34921625467534,31.23133322151463],[121.34860053830993,31.2301461566768],[121.34838441500723,31.22907844640063],[121.34860053831118,31.228010736124465],[121.3492162546756,31.226823671286632],[121.35018439109309,31.225571051007557],[121.3514169157866,31.224298738279146],[121.35328980466955,31.222999958639248],[121.35411946202076,31.222391474521523],[121.35489895937061,31.221785464797817],[121.3564030926012,31.2212816472975],[121.3583726649463,31.221011684661976],[121.36009563842907,31.221011451885223],[121.36181861161329,31.221011219108486],[121.36378819,31.221281194127212],[121.36529239855177,31.221785194720134],[121.36607189601059,31.22239164334313],[121.36690105334354,31.22300021392163],[121.36900000000444,31.22406833888755]]
},
"properties": {}
}