▾
import { convexHullExecute, execute, convexHullExecuteMany, executeMany, convexHullIsConvex } from "@arcgis/core/geometry/operators/convexHullOperator.js";const { convexHullExecute, execute, convexHullExecuteMany, executeMany, convexHullIsConvex } = await $arcgis.import("@arcgis/core/geometry/operators/convexHullOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Calculates the convex hull of 2D geometries. A convex hull is the smallest convex polygon that encloses a group of geometries or vertices. The hull is typically a polygon but can also be a polyline or a point in degenerate cases.

Type definitions
Functions
convexHullExecute
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Calculates the convex hull geometry.
- Signature
-
convexHullExecute (geometry: GeometryUnion): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. | |
- Returns
- GeometryWithoutMeshUnion | null | undefined
Returns the convex hull geometry or null.
- Example
- // Create a convex hull around a polygon.const convexHull = convexHullExecute(polygon);
execute
Calculates the convex hull geometry.
- Signature
-
execute (geometry: GeometryUnion): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. | |
- Returns
- GeometryWithoutMeshUnion | null | undefined
Returns the convex hull geometry or null.
- Example
- // Create a convex hull around a polygon.const convexHull = convexHullExecute(polygon);
convexHullExecuteMany
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Calculates the convex hull.
- Signature
-
convexHullExecuteMany (geometries: GeometryUnion[], options?: ConvexHullOptions): (GeometryWithoutMeshUnion | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometries | The input geometries. All the geometries must have the same spatial reference. | | |
| options | Additional options. | |
- Returns
- (GeometryWithoutMeshUnion | null | undefined)[]
Returns the convex hull geometries or null.
executeMany
Calculates the convex hull.
- Signature
-
executeMany (geometries: GeometryUnion[], options?: ConvexHullOptions): (GeometryWithoutMeshUnion | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometries | The input geometries. All the geometries must have the same spatial reference. | | |
| options | Additional options. | |
- Returns
- (GeometryWithoutMeshUnion | null | undefined)[]
Returns the convex hull geometries or null.
convexHullIsConvex
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Checks if a geometry is convex.
- Signature
-
convexHullIsConvex (geometry: GeometryUnion): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. | |
- Returns
- boolean
Returns
trueif the geometry is convex.
isConvex
Checks if a geometry is convex.
- Signature
-
isConvex (geometry: GeometryUnion): boolean
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. | |
- Returns
- boolean
Returns
trueif the geometry is convex.
Variables
convexHullSupportsCurves
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean
supportsCurves
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- ReturnType