geodeticDensifyOperator

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

Densifies line segments by length in a 2D plane, making them run along specified geodetic curves. There are no segments longer than the specified maximum segment length.

Suggestion: If you have an area of interest such as a visible extent, clip the input geometries before densifying to limit the amount of segments produced.

Method Overview

Name Return Type Summary Object

Densifies the input geometry.

geodeticDensifyOperator

Densifies the input geometries.

geodeticDensifyOperator

Indicates if all dependencies of this module have been loaded.

geodeticDensifyOperator
Promise

Loads this module's dependencies.

geodeticDensifyOperator

Method Details

execute

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

Densifies the input geometry.

Parameters
Specification
geometry Geometry

The input geometry to be densified.

maxSegmentLength Number

The maximum segment length allowed. Unless the unit option is set, the default is meters. Must be a positive value.

options Object
optional

Additional options.

Specification
curveType String
optional
Default Value: "geodesic"

The type of geodetic curve used to densify the geometry.

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

unit LengthUnit
optional

The length unit of maxSegmentLength.

Returns
Type Description
Geometry | null Returns the densified geometry or null. Geometries with a dimension of < 1 are simply passed along.
Example
// Densify a polyline geometry
if (geodeticDensifyOperator.isLoaded()) {
  const densifiedPolyline = geodeticDensifyOperator.execute(polyline, 100);
}

executeMany

Method
executeMany(geometries, maxSegmentLength, options){Array<(Geometry|null)>}

Densifies the input geometries.

Parameters
Specification
geometries Geometry[]

The set of geometries to be densified.

maxSegmentLength Number

The maximum segment length allowed. Unless the unit option is set, the default is meters. Must be a positive value.

options Object
optional

Additional options.

Specification
curveType String
optional
Default Value: "geodesic"

The type of geodetic curve used to densify the geometries.

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

unit LengthUnit
optional

The length unit of maxSegmentLength.

Returns
Type Description
Array<(Geometry|null)> Returns an array whose elements may either be densified geometries or null.

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.