require(["esri/geometry/operators/geodeticDensifyOperator"], (geodeticDensifyOperator) => { /* code goes here */ });
import * as geodeticDensifyOperator from "@arcgis/core/geometry/operators/geodeticDensifyOperator.js";
esri/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()
returnstrue
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
-
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
execute(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
unit
option 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 LengthUnitoptionalThe 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
executeMany(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
unit
option 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 LengthUnitoptionalThe 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
isLoaded
returnsfalse
.ReturnsType Description Promise Resolves when the dependencies have been loaded. - See also