import * as clipOperator from "@arcgis/core/geometry/operators/clipOperator.js";
const clipOperator = await $arcgis.import("@arcgis/core/geometry/operators/clipOperator.js");
@arcgis/core/geometry/operators/clipOperator
Clips geometries with a 2D extent.

Property Overview
| Name | Type | Summary | Object |
|---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | clipOperator |
Property Details
-
supportsCurves
PropertysupportsCurves Booleanreadonly -
Indicates if the operator supports input geometries that contain curves. The value will always be
true.
Method Overview
| Name | Return Type | Summary | Object |
|---|---|---|---|
Perform the clip operation on the input geometry. | clipOperator | ||
Perform the clip operation on the input geometries. | clipOperator |
Method Details
-
execute
Methodexecute(geometry, extent){GeometryUnion |null |undefined} -
Perform the clip operation on the input geometry.
Parametersgeometry GeometryUnionThe geometry to be clipped.
extent ExtentThe extent used to clip the geometry.
ReturnsType Description GeometryUnion | null | undefined Returns the clipped geometry or null. Example// return a new geometry of a polygon clipped by the view's extent const clippedGeometry = clipOperator.execute(polygon, view.extent);
-
executeMany
MethodexecuteMany(geometries, extent){Array<(GeometryUnion|null|undefined)>} -
Perform the clip operation on the input geometries.
Parametersgeometries GeometryUnion[]The array of geometries to be clipped. All the geometries must have the same spatial reference.
extent ExtentThe extent used to clip the geometries.
ReturnsType Description Array<(GeometryUnion|null|undefined)> Returns an array whose elements may either be clipped geometries or null.