import { geodeticDensifyIsLoaded, isLoaded, geodeticDensifyLoad, load, geodeticDensifyExecute } from "@arcgis/core/geometry/operators/geodeticDensifyOperator.js";
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.

Type definitions

GeodeticDensifyOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

curveType

Property
Type
GeodeticCurveType | undefined

The type of geodetic curve used to densify the geometries.

Default value
"geodesic"

unit

Property
Type
LengthUnit | undefined

The length unit of maxSegmentLength.

Default value
"meters"

Options

deprecated Type definition

Functions

geodeticDensifyIsLoaded

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Indicates if all dependencies of this module have been loaded.

Signature
geodeticDensifyIsLoaded (): boolean
Returns
boolean

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

isLoaded

deprecated Function

Indicates if all dependencies of this module have been loaded.

Signature
isLoaded (): boolean
Returns
boolean

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

geodeticDensifyLoad

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

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

See also
Signature
geodeticDensifyLoad (): Promise<void>
Returns
Promise<void>

Resolves when the dependencies have been loaded.

load

deprecated Function

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

See also
Signature
load (): Promise<void>
Returns
Promise<void>

Resolves when the dependencies have been loaded.

geodeticDensifyExecute

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Densifies the input geometry.

Signature
geodeticDensifyExecute (geometry: GeometryUnion, maxSegmentLength: number, options?: GeodeticDensifyOptions): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometry

The input geometry to be densified.

maxSegmentLength

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

options

Additional options.

Returns
GeometryWithoutMeshUnion | null | undefined

Returns the densified geometry or null. Geometries with a dimension of < 1 are simply passed along.

Example
if (!geodeticDensifyIsLoaded()) {
await geodeticDensifyLoad();
}
// Densify a polyline geometry
const densifiedPolyline = geodeticDensifyExecute(polyline, 100);

execute

deprecated Function

Densifies the input geometry.

Signature
execute (geometry: GeometryUnion, maxSegmentLength: number, options?: GeodeticDensifyOptions): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometry

The input geometry to be densified.

maxSegmentLength

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

options

Additional options.

Returns
GeometryWithoutMeshUnion | null | undefined

Returns the densified geometry or null. Geometries with a dimension of < 1 are simply passed along.

Example
if (!geodeticDensifyIsLoaded()) {
await geodeticDensifyLoad();
}
// Densify a polyline geometry
const densifiedPolyline = geodeticDensifyExecute(polyline, 100);

geodeticDensifyExecuteMany

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Densifies the input geometries.

Signature
geodeticDensifyExecuteMany (geometries: GeometryUnion[], maxSegmentLength: number, options?: GeodeticDensifyOptions): (GeometryWithoutMeshUnion | null | undefined)[]

Parameters

ParameterTypeDescriptionRequired
geometries

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

maxSegmentLength

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

options

Additional options.

Returns
(GeometryWithoutMeshUnion | null | undefined)[]

Returns an array whose elements may either be densified geometries or null.

executeMany

deprecated Function

Densifies the input geometries.

Signature
executeMany (geometries: GeometryUnion[], maxSegmentLength: number, options?: GeodeticDensifyOptions): (GeometryWithoutMeshUnion | null | undefined)[]

Parameters

ParameterTypeDescriptionRequired
geometries

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

maxSegmentLength

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

options

Additional options.

Returns
(GeometryWithoutMeshUnion | null | undefined)[]

Returns an array whose elements may either be densified geometries or null.

Variables

geodeticDensifySupportsCurves

Variable
Since
ArcGIS Maps SDK for JavaScript 5.2

Indicates if the operator supports input geometries that contain curves. The value is null or undefined until the operator is loaded, then it will always be true. This will produce densified output geometries.

Type
boolean | null | undefined

supportsCurves

deprecated Variable

Indicates if the operator supports input geometries that contain curves. The value is null or undefined until the operator is loaded, then it will always be true. This will produce densified output geometries.

Type
boolean | null | undefined