import { unionExecute, execute, unionExecuteMany, executeMany, unionSupportsCurves } from "@arcgis/core/geometry/operators/unionOperator.js";
Since
ArcGIS Maps SDK for JavaScript 4.31

Perform a topological union (dissolve) operation on 2D geometries.

Union operator

Functions

unionExecute

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Perform a topological union operation on two geometries.

Signature
unionExecute (geometry1: GeometryUnion, geometry2: GeometryUnion): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometry1

The first geometry to union with.

geometry2

The second geometry to union with.

Returns
GeometryWithoutMeshUnion | null | undefined

Returns the union of the two geometries as a geometry or null.

Example
// Return the union of two polygons
const union = unionExecute(polygon1, polygon2);

execute

deprecated Function

Perform a topological union operation on two geometries.

Signature
execute (geometry1: GeometryUnion, geometry2: GeometryUnion): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometry1

The first geometry to union with.

geometry2

The second geometry to union with.

Returns
GeometryWithoutMeshUnion | null | undefined

Returns the union of the two geometries as a geometry or null.

Example
// Return the union of two polygons
const union = unionExecute(polygon1, polygon2);

unionExecuteMany

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Perform a topological union operation on a geometry set.

Signature
unionExecuteMany (geometries: GeometryUnion[]): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometries

The array of geometries to union. All the geometries must have the same spatial reference.

Returns
GeometryWithoutMeshUnion | null | undefined

Returns the union of geometries as a geometry or null.

executeMany

deprecated Function

Perform a topological union operation on a geometry set.

Signature
executeMany (geometries: GeometryUnion[]): GeometryWithoutMeshUnion | null | undefined

Parameters

ParameterTypeDescriptionRequired
geometries

The array of geometries to union. All the geometries must have the same spatial reference.

Returns
GeometryWithoutMeshUnion | null | undefined

Returns the union of geometries as a geometry or null.

Variables

unionSupportsCurves

Variable
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

deprecated Variable

Indicates if the operator supports input geometries that contain curves. The value will always be true.

Type
ReturnType