# buffer

Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
为给定半径的Feature计算一个缓冲区。支持的单位是英里、公里和度数。

参数

参数 类型 描述
geojson (FeatureCollection|Geometry|Feature ) input to be buffered
radius number distance to draw the buffer (negative values are allowed)
options Object Optional parameters: see below

options选项

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

返回

(FeatureCollection|Feature <(Polygon|MultiPolygon)>|undefined) - buffered features

示例

var point = turf.point([-90.548630, 14.616599]);
var buffered = turf.buffer(point, 500, {units: 'miles'});
Last Updated: 1/19/2021, 10:59:20 AM