import * as geodesicBufferOperator from "@arcgis/core/geometry/operators/geodesicBufferOperator.js";
const geodesicBufferOperator = await $arcgis.import("@arcgis/core/geometry/operators/geodesicBufferOperator.js");
@arcgis/core/geometry/operators/geodesicBufferOperator
Geodesically buffer 2D geometries. A geodesic buffer creates an area around a geometry by calculating the shortest distance between points on the curved surface of the Earth, minimizing the distortion caused by map projections. This results in a more accurate buffer when applied over larger geographic areas such as those covering multiple UTM zones, or when using global scales.
Notes
- Verify that
isLoaded()returnstruebefore 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. The value is
nullorundefineduntil the operator is loaded, then it will always betrue. This will produce densified output 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 GeometryUnionThe geometry to buffer.
distance NumberThe buffer distance for the geometry. Unless the
unitoption 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
unitoption 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 LengthUnitoptionalDefault Value: "meters"The 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
unitoption 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
unitoption 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 LengthUnitoptionalDefault Value: "meters"The length unit of the buffer distances and max deviation.
Returns
-
Loads this module's dependencies. This method must be called first if
isLoadedreturnsfalse.ReturnsType Description Promise Resolves when the dependencies have been loaded. - See also