import { execute, executeMany, isConvex, supportsCurves } from "@arcgis/core/geometry/operators/convexHullOperator.js";const { execute, executeMany, isConvex, supportsCurves } = 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
| Name | Return Type | Object |
|---|---|---|
| | |
| | ||
(GeometryWithoutMeshUnion | null | undefined)[] | | |
| | ||
| |
execute
Function
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 = convexHullOperator.execute(polygon); executeMany
Function
Calculates the convex hull.
- Signature
-
executeMany (geometries: GeometryUnion[], options?: Options): (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.
isConvex
Function
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
supportsCurves
Variable
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean