# circle

Takes a Point and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.
取一个点并计算给定的以度、弧度、英里或公里为半径的圆多边形

参数

参数 类型 描述
center (Feature <Point>|Array) center point
radius number radius of the circle
options Object Optional parameters: see below

options选项

属性 类型 默认值 描述
units string kilometers any of the options supported by turf units
steps number 64 number of steps
properties Object {} properties

返回

Feature <Polygon> - circle polygon

示例

var center = [-75.343, 39.984];
var radius = 5;
var options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};
var circle = turf.circle(center, radius, options);
Last Updated: 1/19/2021, 10:59:20 AM