计算一个或多个几何的凸包。凸包是包围一组几何图形或顶点的最小凸多边形。输入可以是单个几何体(例如折线)或任何几何体类型的数组。 shell 通常是多边形,但在退化情况下也可以是折线或点。
参数:
类型 说明 用于计算凸包的输入几何图形。如果指定了数组,则输入数组可以包括各种几何类型。当提供一个数组时,输出也将是一个数组。
merge Boolean可选的 默认值:错误的指示是否将输出合并到单个几何体(通常是多边形)中。
返回:
类型 说明 Promise<(Geometry|Geometry[])> 解析为输入几何的凸包。这通常是一个多边形,但也可以是一条折线(如果输入是一组点或形成一条直线的折线)或一个点(在退化的情况下)。 例子:
// returns the convex hull of a multipoint as a single polygon const hull = await geometryEngineAsync.convexHull(multipoint);
// returns the convex hull of an array of points as a single polygon const [ hull ] = await geometryEngineAsync.convexHull([ pointA, pointB, pointC ], true);
// returns the convex hull for each input line geometry as three polygons const hulls = await geometryEngineAsync.convexHull([ lineA, lineB, lineC ]);
// returns the convex hull for all input line geometries as a single polygon const [ hull ] = await geometryEngineAsync.convexHull([ lineA, lineB, lineC ], true);
// returns the convex hull for all input geometries as a single polygon const [ hull ] = await geometryEngineAsync.convexHull([ point, line, polygon ], true);
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/geometry/geometryEngineAsync"], (geometryEngineAsync) => { /* code goes here */ });
ESM:
import * as geometryEngineAsync from "@arcgis/core/geometry/geometryEngineAsync";
对象:
esri/geometry/geometryEngineAsync
自从:用于 JavaScript 4.0 的 ArcGIS API
用法说明
geometryEngineAsync.convexHull
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS geometryEngineAsync.contains用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.crosses用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.cut用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.clip用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.overlaps用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.geodesicBuffer用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.intersects用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.symmetricDifference用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.distance用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.intersect用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.planarArea用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.flipHorizontal用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.rotate用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.generalize用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.difference用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.touches用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.disjoint用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.buffer用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.nearestVertex用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.within用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.union用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.isSimple用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.geodesicDensify用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.densify用法及代码示例
- JavaScript ArcGIS geometryEngineAsync.equals用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 geometryEngineAsync.convexHull。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。