计算并返回一个致密的折线或多边形。
参数:
类型 说明 输入折线或多边形。
maxSegmentLength Number顶点之间的最大长度(以米为单位)。
返回:
类型 说明 Polyline | Polygon 致密的折线或多边形。 例子:
// Densify the polygon representing Bermuda Triangle with maximum segment size of 100km. const MIAMI = { lat: 25.775278, lon: -80.208889 }; // Florida const HAMILTON = { lat: 32.293, lon: -64.782 }; // Bermuda const SANJUAN = { lat: 18.406389, lon: -66.063889 }; // Puerto Rico const polygon = new Polygon({ rings: [[ [MIAMI.lon, MIAMI.lat], [HAMILTON.lon, HAMILTON.lat], [SANJUAN.lon, SANJUAN.lat], [MIAMI.lon, MIAMI.lat] ]] }); const densifiedPolygon = geodesicUtils.geodesicDensify(polygon, 100000); const vertexCountBefore = polygon.rings[0].length; const vertexCountAfter = densifiedPolygon.rings[0].length; console.log("Before: ", vertexCountBefore, ", After: ", vertexCountAfter); // Before: 4, After: 51
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/geometry/support/geodesicUtils"], (geodesicUtils) => { /* code goes here */ });
ESM:
import * as geodesicUtils from "@arcgis/core/geometry/support/geodesicUtils";
对象:
esri/geometry/support/geodesicUtils
自从:用于 JavaScript 4.12 的 ArcGIS API
用法说明
geodesicUtils.geodesicDensify
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS geodesicUtils.geodesicDistance用法及代码示例
- JavaScript ArcGIS geodesicUtils.geodesicAreas用法及代码示例
- JavaScript ArcGIS geodesicUtils.geodesicLengths用法及代码示例
- JavaScript ArcGIS geodesicUtils.pointFromDistance用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.overlaps用法及代码示例
- JavaScript ArcGIS geometryEngine.buffer用法及代码示例
- JavaScript ArcGIS geometryEngine.equals用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.geodesicBuffer用法及代码示例
- JavaScript ArcGIS geometryEngine.touches用法及代码示例
- JavaScript ArcGIS geometryEngine.generalize用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.intersects用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.symmetricDifference用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.distance用法及代码示例
- JavaScript ArcGIS geometryEngine.union用法及代码示例
- JavaScript ArcGIS geometryEngine.within用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.intersect用法及代码示例
- JavaScript ArcGIS geometryEngine.geodesicLength用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.planarArea用法及代码示例
- JavaScript ArcGIS geometryEngine.symmetricDifference用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.crosses用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.flipHorizontal用法及代码示例
- JavaScript ArcGIS geometryService.cut用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.rotate用法及代码示例
- JavaScript ArcGIS geometryEngine.intersects用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.generalize用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 geodesicUtils.geodesicDensify。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。