require(["esri/geometry/operators/polygonOverlayOperator"], (polygonOverlayOperator) => { /* code goes here */ });
import * as polygonOverlayOperator from "@arcgis/core/geometry/operators/polygonOverlayOperator.js";
esri/geometry/operators/polygonOverlayOperator
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 geometries that contain curves. | polygonOverlayOperator |
Property Details
-
supportsCurves
supportsCurves Booleanreadonly
-
Indicates if the operator supports input geometries 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
-
Performs the topological overlay of the geometry set in the XY plane.
ParametersSpecificationgeometries GeometryUnion[]The set of geometries to overlay. All the geometries must have the same spatial reference.
options ObjectoptionalAdditional options.
Specificationgaps BooleanoptionalCreate polygons to fill gaps. Gaps are empty areas between different polygons, that have a closed boundary.
holes BooleanoptionalCreate 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 BooleanoptionalOutput non-overlapping areas of polygons.
overlaps BooleanoptionalOutput overlapping areas of polygons.
multiPart BooleanoptionalOutput multipart polygons. This option must be combined with other options. 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).
ReturnsExample// Overlay a set of geometries const result = polygonOverlayOperator.executeMany(geometries);