convexHullOperator

AMD: require(["esri/geometry/operators/convexHullOperator"], (convexHullOperator) => { /* code goes here */ });
ESM: import * as convexHullOperator from "@arcgis/core/geometry/operators/convexHullOperator.js";
Object: esri/geometry/operators/convexHullOperator
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.

Property Overview

Name Type Summary Object

Indicates if the operator supports input geometries that contain curves.

convexHullOperator

Property Details

supportsCurves

Property
supportsCurves Booleanreadonly

Indicates if the operator supports input geometries that contain curves.

Default Value:false

Method Overview

Name Return Type Summary Object

Calculates the convex hull geometry.

convexHullOperator

Calculates the convex hull.

convexHullOperator

Checks if a geometry is convex.

convexHullOperator

Method Details

execute

Method
execute(geometry){GeometryUnion |null |undefined}

Calculates the convex hull geometry.

Parameter
geometry GeometryUnion

The input geometry.

Returns
Type Description
GeometryUnion | null | undefined Returns the convex hull geometry or null.
Example
// Create a convex hull around a polygon.
const convexHull = convexHullOperator.execute(polygon);

executeMany

Method
executeMany(geometries, options){Array<(GeometryUnion|null|undefined)>}

Calculates the convex hull.

Parameters
geometries GeometryUnion[]

The input geometries. All the geometries must have the same spatial reference.

options Object
optional

Additional options.

Specification
merge Boolean
optional
Default Value: false

Indicates if the convex hull geometries should be merged. Set to true to merge the geometries into a single geometry.

Returns
Type Description
Array<(GeometryUnion|null|undefined)> Returns the convex hull geometries or null.

isConvex

Method
isConvex(geometry){Boolean}

Checks if a geometry is convex.

Parameter
geometry GeometryUnion

The input geometry.

Returns
Type Description
Boolean Returns true if the geometry is convex.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.