▾
import { clipExecute, execute, clipExecuteMany, executeMany, clipSupportsCurves } from "@arcgis/core/geometry/operators/clipOperator.js";const { clipExecute, execute, clipExecuteMany, executeMany, clipSupportsCurves } = await $arcgis.import("@arcgis/core/geometry/operators/clipOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Clips geometries with a 2D extent.

Functions
clipExecute
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Perform the clip operation on the input geometry.
- Signature
-
clipExecute (geometry: GeometryUnion, extent: Extent): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The geometry to be clipped. | | |
| extent | The extent used to clip the geometry. | |
- Returns
- GeometryWithoutMeshUnion | null | undefined
Returns the clipped geometry or null.
- Example
- // return a new geometry of a polygon clipped by the view's extentconst clippedGeometry = clipExecute(polygon, view.extent);
execute
Perform the clip operation on the input geometry.
- Signature
-
execute (geometry: GeometryUnion, extent: Extent): GeometryWithoutMeshUnion | null | undefined
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The geometry to be clipped. | | |
| extent | The extent used to clip the geometry. | |
- Returns
- GeometryWithoutMeshUnion | null | undefined
Returns the clipped geometry or null.
- Example
- // return a new geometry of a polygon clipped by the view's extentconst clippedGeometry = clipExecute(polygon, view.extent);
clipExecuteMany
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Perform the clip operation on the input geometries.
- Signature
-
clipExecuteMany (geometries: GeometryUnion[], extent: Extent): (GeometryWithoutMeshUnion | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometries | The array of geometries to be clipped. All the geometries must have the same spatial reference. | | |
| extent | The extent used to clip the geometries. | |
- Returns
- (GeometryWithoutMeshUnion | null | undefined)[]
Returns an array whose elements may either be clipped geometries or null.
executeMany
Perform the clip operation on the input geometries.
- Signature
-
executeMany (geometries: GeometryUnion[], extent: Extent): (GeometryWithoutMeshUnion | null | undefined)[]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometries | The array of geometries to be clipped. All the geometries must have the same spatial reference. | | |
| extent | The extent used to clip the geometries. | |
- Returns
- (GeometryWithoutMeshUnion | null | undefined)[]
Returns an array whose elements may either be clipped geometries or null.
Variables
clipSupportsCurves
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- boolean
supportsCurves
Indicates if the operator supports input geometries that contain curves.
The value will always be true.
- Type
- ReturnType