polygonOverlayOperator

ESM: import * as polygonOverlayOperator from "@arcgis/core/geometry/operators/polygonOverlayOperator.js";
CDN: const polygonOverlayOperator = await $arcgis.import("@arcgis/core/geometry/operators/polygonOverlayOperator.js");
Object: @arcgis/core/geometry/operators/polygonOverlayOperator
Since: ArcGIS Maps SDK for JavaScript 4.31

Performs an overlay operation on a set of 2D polygons in the XY plane. This operation produces similar results to the Union tool in Geoprocessing.

Property Overview

Name Type Summary Object

Indicates if the operator supports input polygons that contain curves.

polygonOverlayOperator

Property Details

supportsCurves

Property
supportsCurves Booleanreadonly

Indicates if the operator supports input polygons that contain curves.

Default Value:true

Method Overview

Name Return Type Summary Object

Performs the topological overlay of the geometry set in the XY plane.

polygonOverlayOperator

Method Details

executeMany

Method
executeMany(polygons, options){ExecuteManyResult}

Performs the topological overlay of the geometry set in the XY plane.

Parameters
Specification
polygons Polygon[]

The set of polygons to overlay. All the polygons must have the same spatial reference.

options Object
optional

Additional options.

Specification
gaps Boolean
optional

Create polygons to fill gaps. Gaps are empty areas between different polygons, that have a closed boundary.

holes Boolean
optional

Create polygons to fill holes. Holes are empty areas completely enclosed by a single polygon. In addition to regular holes formed by the interior rings, the operator considers any empty area that has a closed boundary formed by the segments of same polygon to be a hole. For example, a gap between two or more exterior rings of same polygon is also considered a hole.

noOverlaps Boolean
optional
Default Value: true

Output non-overlapping areas of polygons.

overlaps Boolean
optional
Default Value: true

Output overlapping areas of polygons.

multiPart Boolean
optional

Output multipart polygons. Multipart output requires more processing. If the option is not set, the output will contain single part polygons (one exterior ring and zero or more holes).

Returns
Type Description
ExecuteManyResult Returns the result polygons and ids. Overlaps have two or more ids, no-overlaps have one id, and gaps have no ids.
Example
// Overlay a set of polygons
const result = polygonOverlayOperator.executeMany(polygons);

Type Definitions

ExecuteManyResult

Type Definition
ExecuteManyResult

Object returned by the executeMany() method.

Properties
results Polygon[]

The array of polygons returned by the operator.

The corresponding set of ids for each result. Each id is the index of the polygon in the input array. result[0] corresponds to ids[0], result[1] to ids[1], etc.

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