import { execute, executeMany, supportsCurves } from "@arcgis/core/geometry/operators/alphaShapeOperator.js";const { execute, executeMany, supportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/alphaShapeOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Calculates the alpha shape of 2D points (concave hull). Alpha shapes are used to generalize bounding polygons containing sets of points or multipoints. Using this operator on other geometry types will produce results, however it is probably not what you are expecting.

- See also
Type definitions
Functions
| Name | Return Type | Object |
|---|---|---|
| | |
| | |
| | ||
| | ||
| |
execute
Calculates the alpha shape on the input geometry.
- Signature
-
execute (geometry: GeometryUnion, alpha: number): ExecuteResult
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. Only geometry vertices are used to compute the alpha shape. | | |
| alpha | Controls the level of detail and concavity of the boundary. The value represents the square of the alpha radius for the alpha shape. Values of 0.0 or small positive numbers will yield an empty alpha shape. A negative number or NaN will lead to the alpha shape being computed with the minimal alpha value necessary to produce a connected result. | |
- Returns
- ExecuteResult
Returns an object containing a polygon of the alpha shape and the calculated alpha value. The result polygon is not guaranteed to be simple in the sense that it may contain very short segments.
Example
// Calculate the alpha shape of a multipoint geometryconst result = alphaShapeOperator.execute(geometry, 100); executeMany
Calculates the alpha shape on a set of geometries with the option to aggregate the result.
- Signature
-
executeMany (geometries: GeometryUnion[], alpha: number, options?: Options): (Polygon | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometries | The input geometries. Only geometry vertices are used to compute the alpha shape. All the geometries must have the same spatial reference. | | |
| alpha | Controls the level of detail and concavity of the boundary. The value represents the square of the alpha radius for the alpha shape. Values of 0.0 or small positive numbers will yield an empty alpha shape. A negative number or NaN will lead to the alpha shape being computed with the minimal alpha value necessary to produce a connected result. | | |
| options | Additional options. | |
Variables
supportsCurves
Indicates if the operator supports input geometries that contain curves.
The value will always be false.
- Type
- boolean