require(["esri/geometry/operators/geodesicBufferOperator"], (geodesicBufferOperator) => { /* code goes here */ });
import * as geodesicBufferOperator from "@arcgis/core/geometry/operators/geodesicBufferOperator.js";
esri/geometry/operators/geodesicBufferOperator
Geodesically buffer 2D geometries.
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Creates a geodesic buffer around the input geometry. | geodesicBufferOperator | ||
Creates a geodesic buffer around the input geometries. | geodesicBufferOperator | ||
Indicates if all dependencies of this module have been loaded. | geodesicBufferOperator | ||
Promise | Loads this module's dependencies. | geodesicBufferOperator |
Method Details
-
Creates a geodesic buffer around the input geometry.
ParametersSpecificationgeometry GeometryThe geometry to buffer.
distance NumberThe buffer distance for the geometry. Unless the
unit
option is set, the default is meters.options ObjectoptionalAdditional options.
SpecificationcurveType StringoptionalDefault Value: "geodesic"The type of geodetic curve used to determine the buffer.
Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-selection"|"shape-preserving"
maxDeviation NumberoptionalDefault Value: NaNThe deviation offset to use for convergence. Unless the
unit
option is set, the default is meters. The geodesic arcs of the resulting buffer will be closer than the max deviation of the true buffer. The default value of NaN will be a maximum of 0.01 meters and (up-to) 0.2% of the buffer distance.unit LengthUnitoptionalThe length unit of the buffer distance and max deviation.
ReturnsExample// Calculate the buffer of a polyline geometry if (geodesicBufferOperator.isLoaded()) { const bufferGeometry = geodesicBufferOperator.execute(polyline, 100); }
-
Creates a geodesic buffer around the input geometries.
ParametersSpecificationThe set of geometries to buffer.
The buffer distance for each of the geometries. Unless the
unit
option is set, the default is meters. If the size of the distances array is less than the number of geometries in the input geometries, the last distance value is used for the rest of geometries.options ObjectoptionalAdditional options.
SpecificationcurveType StringoptionalDefault Value: "geodesic"The type of geodetic curve used to determine the buffer.
Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-selection"|"shape-preserving"
maxDeviation NumberoptionalDefault Value: NaNThe deviation offset to use for convergence. Unless the
unit
option is set, the default is meters. The geodesic arcs of the resulting buffer will be closer than the max deviation of the true buffer. The default value of NaN will be a maximum of 0.01 meters and (up-to) 0.2% of the buffer distance.union BooleanoptionalDefault Value: falseIf true, the resulting buffer geometries will be unioned.
unit LengthUnitoptionalThe length unit of the buffer distances and max deviation.
Returns
-
Loads this module's dependencies. This method must be called first if
isLoaded
returnsfalse
.ReturnsType Description Promise Resolves when the dependencies have been loaded. - See also