Skip to content
import { execute, executeMany, supportsCurves } 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

execute

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 = unionOperator.execute(polygon1, polygon2);

executeMany

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

supportsCurves

Variable

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

Type
boolean