計算一個或多個幾何的凸包。凸包是包圍一組幾何圖形或頂點的最小凸多邊形。輸入可以是單個幾何體(例如折線)或任何幾何體類型的數組。 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。