▾
import { geodeticDensifyIsLoaded, isLoaded, geodeticDensifyLoad, load, geodeticDensifyExecute } from "@arcgis/core/geometry/operators/geodeticDensifyOperator.js";const { geodeticDensifyIsLoaded, isLoaded, geodeticDensifyLoad, load, geodeticDensifyExecute } = await $arcgis.import("@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
- Since
- ArcGIS Maps SDK for JavaScript 5.2
curveType
- Type
- GeodeticCurveType | undefined
The type of geodetic curve used to densify the geometries.
- Default value
- "geodesic"
unit
- Type
- LengthUnit | undefined
The length unit of maxSegmentLength.
- Default value
- "meters"
Functions
geodeticDensifyIsLoaded
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Indicates if all dependencies of this module have been loaded.
- Signature
-
geodeticDensifyIsLoaded (): boolean
- Returns
- boolean
Returns
trueif this module's dependencies have been loaded.
isLoaded
Indicates if all dependencies of this module have been loaded.
- Signature
-
isLoaded (): boolean
- Returns
- boolean
Returns
trueif this module's dependencies have been loaded.
geodeticDensifyLoad
- 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>
load
Loads this module's dependencies. This method must be called first if isLoaded returns false.
- See also
- Signature
-
load (): Promise<void>
geodeticDensifyExecute
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Densifies the input geometry.
- Signature
-
geodeticDensifyExecute (geometry: GeometryUnion, maxSegmentLength: number, options?: GeodeticDensifyOptions): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry to be densified. | | |
| maxSegmentLength | The maximum segment length allowed. Unless the | | |
| 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 geometryconst densifiedPolyline = geodeticDensifyExecute(polyline, 100);
execute
Densifies the input geometry.
- Signature
-
execute (geometry: GeometryUnion, maxSegmentLength: number, options?: GeodeticDensifyOptions): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry to be densified. | | |
| maxSegmentLength | The maximum segment length allowed. Unless the | | |
| 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 geometryconst densifiedPolyline = geodeticDensifyExecute(polyline, 100);
geodeticDensifyExecuteMany
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Densifies the input geometries.
- Signature
-
geodeticDensifyExecuteMany (geometries: GeometryUnion[], maxSegmentLength: number, options?: GeodeticDensifyOptions): (GeometryWithoutMeshUnion | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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 | | |
| options | Additional options. | |
- Returns
- (GeometryWithoutMeshUnion | null | undefined)[]
Returns an array whose elements may either be densified geometries or null.
executeMany
Densifies the input geometries.
- Signature
-
executeMany (geometries: GeometryUnion[], maxSegmentLength: number, options?: GeodeticDensifyOptions): (GeometryWithoutMeshUnion | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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 | | |
| options | Additional options. | |
- Returns
- (GeometryWithoutMeshUnion | null | undefined)[]
Returns an array whose elements may either be densified geometries or null.