import * as geodeticDensifyOperator from "@arcgis/core/geometry/operators/geodeticDensifyOperator.js";
const geodeticDensifyOperator = await $arcgis.import("@arcgis/core/geometry/operators/geodeticDensifyOperator.js");
@arcgis/core/geometry/operators/geodeticDensifyOperator
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()returnstruebefore 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
-
Indicates if the operator supports input geometries that contain curves. The value is
nullorundefineduntil the operator is loaded, then it will always betrue. This will produce densified output geometries.
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
Methodexecute(geometry, maxSegmentLength, options){GeometryUnion |null |undefined} -
Densifies the input geometry.
ParametersSpecificationgeometry GeometryUnionThe input geometry to be densified.
maxSegmentLength NumberThe maximum segment length allowed. Unless the
unitoption is set, the default is meters. Must be a positive value.options ObjectoptionalAdditional options.
SpecificationcurveType StringoptionalDefault Value: "geodesic"The type of geodetic curve used to densify the geometry.
Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-section"|"shape-preserving"
unit LengthUnitoptionalDefault Value: "meters"The length unit of
maxSegmentLength.ReturnsType Description GeometryUnion | null | undefined Returns the densified geometry or null. Geometries with a dimension of < 1 are simply passed along. Exampleif (!geodeticDensifyOperator.isLoaded()) { await geodeticDensifyOperator.load(); } // Densify a polyline geometry const densifiedPolyline = geodeticDensifyOperator.execute(polyline, 100);
-
executeMany
MethodexecuteMany(geometries, maxSegmentLength, options){Array<(GeometryUnion|null|undefined)>} -
Densifies the input geometries.
ParametersSpecificationgeometries GeometryUnion[]The set of geometries to be densified. All the geometries must have the same spatial reference.
maxSegmentLength NumberThe maximum segment length allowed. Unless the
unitoption is set, the default is meters. Must be a positive value.options ObjectoptionalAdditional options.
SpecificationcurveType StringoptionalDefault Value: "geodesic"The type of geodetic curve used to densify the geometries.
Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-section"|"shape-preserving"
unit LengthUnitoptionalDefault Value: "meters"The length unit of
maxSegmentLength.ReturnsType Description Array<(GeometryUnion|null|undefined)> Returns an array whose elements may either be densified geometries or null.
-
Loads this module's dependencies. This method must be called first if
isLoadedreturnsfalse.ReturnsType Description Promise Resolves when the dependencies have been loaded. - See also