import { executeMany, supportsCurves } from "@arcgis/core/geometry/operators/polygonOverlayOperator.js";const { executeMany, supportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/polygonOverlayOperator.js");- 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.
Type definitions
Options
holes
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.
ExecuteManyResult
Object returned by the executeMany() method.
ids
- Type
- number[][]
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.
Functions
| Name | Return Type | Object |
|---|---|---|
| | |
| | |
| | ||
| |
executeMany
Performs the topological overlay of the geometry set in the XY plane.
- Signature
-
executeMany (polygons: Polygon[], options?: Options): ExecuteManyResult
Parameters
- Returns
- 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 polygonsconst result = polygonOverlayOperator.executeMany(polygons);Variables
supportsCurves
Indicates if the operator supports input polygons that contain curves.
The value will always be true.
- Type
- boolean