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.
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.
ParametersSpecificationThe set of geometries to overlay.
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 conidered 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 sigle part polygons (one exterior ring and zero or more holes).
ReturnsExample// Overlay a set of geometries const result = polygonOverlayOperator.executeMany(geometries);