require(["esri/geometry/operators/bufferOperator"], (bufferOperator) => { /* code goes here */ });
import * as bufferOperator from "@arcgis/core/geometry/operators/bufferOperator.js";
esri/geometry/operators/bufferOperator
Creates planar buffers around 2D geometries.
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Creates a buffer around the input geometry. | bufferOperator | ||
Creates a buffer around the input geometries. | bufferOperator |
Method Details
-
Creates a buffer around the input geometry.
Parametersgeometry GeometryThe input geometry to be buffered.
distance NumberThe buffer distance for the geometry. Unless the
unit
option is set, the default is the geometry's spatial reference unit.options ObjectoptionalAdditional options.
Specificationunit LengthUnitoptionalThe length unit of the buffer distance. An error will be thrown if this is set for Geographic Coordinate Systems.
ReturnsExample// Buffer a polyline geometry const bufferGeometry = bufferOperator.execute(polyline, 1000);
-
Creates a buffer around the input geometries.
Both
maxDeviation
andmaxVerticesInFullCircle
control the quality of round joins that are in the buffers. The precision of each buffer ismaxDeviation
unless the number of required vertices is too large.ParametersSpecificationThe input geometries to be buffered.
The buffer distances for the geometries. If the size of this array is less than the number of geometries in the input
geometries
, the last distance value is used for the rest of geometries. Unless theunit
option is set, the default is the geometries spatial reference unit.options ObjectoptionalAdditional options.
SpecificationmaxDeviation NumberoptionalDefault Value: NaNThe max deviation of the result buffer from the true buffer. When the value is NaN, internal logic is used to select deviation based on the buffer distance. Unless the
unit
option is set, the default is the geometries spatial reference unit.maxVerticesInFullCircle NumberoptionalDefault Value: 96The maximum number of vertices in the polygon produced from a buffered point.
union BooleanoptionalDefault Value: falseIndicates if the buffer geometries should be unioned. When set to
true
, the output will be a single geometry.unit LengthUnitoptionalThe length unit of the buffer distances and max deviation. An error will be thrown if this is set for Geographic Coordinate Systems.
Returns