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

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.

Notes

  • 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.
  • Verify that isLoaded() returns true 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.

geodeticDensifyOperator

Property Details

supportsCurves

Property
supportsCurves Boolean |null |undefinedreadonly

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

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){GeometryUnion |null |undefined}

Densifies the input geometry.

Parameters
Specification
geometry GeometryUnion

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-section"|"shape-preserving"

unit LengthUnit
optional

The length unit of maxSegmentLength.

Returns
Type Description
GeometryUnion | null | undefined Returns the densified geometry or null. Geometries with a dimension of < 1 are simply passed along.
Example
if (!geodeticDensifyOperator.isLoaded()) {
  await geodeticDensifyOperator.load();
}

// Densify a polyline geometry
const densifiedPolyline = geodeticDensifyOperator.execute(polyline, 100);

executeMany

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

Densifies the input geometries.

Parameters
Specification
geometries GeometryUnion[]

The set of geometries to be densified. All the geometries must have the same spatial reference.

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-section"|"shape-preserving"

unit LengthUnit
optional

The length unit of maxSegmentLength.

Returns
Type Description
Array<(GeometryUnion|null|undefined)> 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.