geodesicBufferOperator

AMD: require(["esri/geometry/operators/geodesicBufferOperator"], (geodesicBufferOperator) => { /* code goes here */ });
ESM: import * as geodesicBufferOperator from "@arcgis/core/geometry/operators/geodesicBufferOperator.js";
Object: esri/geometry/operators/geodesicBufferOperator
Since: ArcGIS Maps SDK for JavaScript 4.31
beta

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

execute

Method
execute(geometry, distance, options){Geometry |null}

Creates a geodesic buffer around the input geometry.

Parameters
Specification
geometry Geometry

The geometry to buffer.

distance Number

The buffer distance for the geometry. Unless the unit option is set, the default is meters.

options Object
optional

Additional options.

Specification
curveType String
optional
Default Value: "geodesic"

The type of geodetic curve used to determine the buffer.

Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-selection"|"shape-preserving"

maxDeviation Number
optional
Default Value: NaN

The 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 LengthUnit
optional

The length unit of the buffer distance and max deviation.

Returns
Type Description
Geometry | null Returns the buffered geometry or null.
Example
// Calculate the buffer of a polyline geometry
if (geodesicBufferOperator.isLoaded()) {
  const bufferGeometry = geodesicBufferOperator.execute(polyline, 100);
}

executeMany

Method
executeMany(geometries, distances, options){Geometry[]}

Creates a geodesic buffer around the input geometries.

Parameters
Specification
geometries Geometry[]

The set of geometries to buffer.

distances Number[]

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 Object
optional

Additional options.

Specification
curveType String
optional
Default Value: "geodesic"

The type of geodetic curve used to determine the buffer.

Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-selection"|"shape-preserving"

maxDeviation Number
optional
Default Value: NaN

The 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 Boolean
optional
Default Value: false

If true, the resulting buffer geometries will be unioned.

unit LengthUnit
optional

The length unit of the buffer distances and max deviation.

Returns
Type Description
Geometry[] Returns the buffered geometries.

isLoaded

Method
isLoaded(){Boolean}

Indicates if all dependencies of this module have been loaded.

Returns
Type Description
Boolean Returns true if this module's dependencies have been loaded.

load

Method
load(){Promise}

Loads this module's dependencies. This method must be called first if isLoaded returns false.

Returns
Type Description
Promise Resolves when the dependencies have been loaded.
See also

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.