clipOperator

AMD: require(["esri/geometry/operators/clipOperator"], (clipOperator) => { /* code goes here */ });
ESM: import * as clipOperator from "@arcgis/core/geometry/operators/clipOperator.js";
Object: esri/geometry/operators/clipOperator
Since: ArcGIS Maps SDK for JavaScript 4.31

Clips geometries with a 2D extent.

Clip operator

Property Overview

Name Type Summary Object

Indicates if the operator supports input geometries that contain curves.

clipOperator

Property Details

supportsCurves

Property
supportsCurves Booleanreadonly

Indicates if the operator supports input geometries that contain curves.

Default Value: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

Method
execute(geometry, extent){GeometryUnion |null |undefined}

Perform the clip operation on the input geometry.

Parameters
geometry GeometryUnion

The geometry to be clipped.

extent Extent

The extent used to clip the geometry.

Returns
Type 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

Method
executeMany(geometries, extent){Array<(GeometryUnion|null|undefined)>}

Perform the clip operation on the input geometries.

Parameters
geometries GeometryUnion[]

The array of geometries to be clipped. All the geometries must have the same spatial reference.

extent Extent

The extent used to clip the geometries.

Returns
Type Description
Array<(GeometryUnion|null|undefined)> Returns an array whose elements may either be clipped geometries or null.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.