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.
Notes
- Verify that
isLoaded()
returnstrue
before using this module. - Use
load()
to load this module's dependencies.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | geodesicBufferOperator |
Property Details
-
Indicates if the operator supports input geometries that contain curves. This will produce densified output geometries.
- Default Value:true
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 GeometryUnionThe 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-section"|"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.
ReturnsExampleif (!geodesicBufferOperator.isLoaded()) { await geodesicBufferOperator.load(); } // Calculate the buffer of a polyline geometry const bufferGeometry = geodesicBufferOperator.execute(polyline, 100);
-
Creates a geodesic buffer around the input geometries.
ParametersSpecificationgeometries GeometryUnion[]The set of geometries to buffer. All the geometries must have the same spatial reference.
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-section"|"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