▾
import { polygonOverlayExecuteMany, executeMany, polygonOverlaySupportsCurves, supportsCurves } from "@arcgis/core/geometry/operators/polygonOverlayOperator.js";const { polygonOverlayExecuteMany, executeMany, polygonOverlaySupportsCurves, 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
PolygonOverlayOptions
- Since
- ArcGIS Maps SDK for JavaScript 5.2
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
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Object returned by the polygonOverlayExecuteMany() 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
polygonOverlayExecuteMany
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Performs the topological overlay of the geometry set in the XY plane.
- Signature
-
polygonOverlayExecuteMany (polygons: Polygon[], options?: PolygonOverlayOptions): ExecuteManyResult
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| polygons | Polygon[] | The set of polygons to overlay. All the polygons must have the same spatial reference. | |
| options | Additional options. | |
- 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 = polygonOverlayExecuteMany(polygons);
executeMany
Performs the topological overlay of the geometry set in the XY plane.
- Signature
-
executeMany (polygons: Polygon[], options?: PolygonOverlayOptions): ExecuteManyResult
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| polygons | Polygon[] | The set of polygons to overlay. All the polygons must have the same spatial reference. | |
| options | Additional options. | |
- 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 = polygonOverlayExecuteMany(polygons);
Variables
polygonOverlaySupportsCurves
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Indicates if the operator supports input polygons that contain curves.
The value will always be true.
- Type
- boolean
supportsCurves
Indicates if the operator supports input polygons that contain curves.
The value will always be true.
- Type
- ReturnType