unionOperator

AMD: require(["esri/geometry/operators/unionOperator"], (unionOperator) => { /* code goes here */ });
ESM: import * as unionOperator from "@arcgis/core/geometry/operators/unionOperator.js";
Object: esri/geometry/operators/unionOperator
Since: ArcGIS Maps SDK for JavaScript 4.31

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

Property Overview

Name Type Summary Object

Indicates if the operator supports input geometries that contain curves.

unionOperator

Property Details

supportsCurves

Property
supportsCurves Booleanreadonly

Indicates if the operator supports input geometries that contain curves.

Default Value:true

Method Overview

Name Return Type Summary Object

Perform a topological union operation on two geometries.

unionOperator

Perform a topological union operation on a geometry set.

unionOperator

Method Details

execute

Method
execute(geometry1, geometry2){GeometryUnion |null |undefined}

Perform a topological union operation on two geometries.

Parameters
geometry1 GeometryUnion

The first geometry to union with.

geometry2 GeometryUnion

The second geometry to union with.

Returns
Type Description
GeometryUnion | 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

Method
executeMany(geometries){GeometryUnion |null |undefined}

Perform a topological union operation on a geometry set.

Parameter
geometries GeometryUnion[]

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

Returns
Type Description
GeometryUnion | null | undefined Returns the union of geometries as a geometry or null.

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