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
beta

Clips geometries with a 2D extent.

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){Geometry |null}

Perform the clip operation on the input geometry.

Parameters
geometry Geometry

The geometry to be clipped.

extent Extent

The extent used to clip the geometry.

Returns
Type Description
Geometry | null 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<(Geometry|null)>}

Perform the clip operation on the input geometries.

Parameters
geometries Geometry[]

The array of geometries to be clipped.

extent Extent

The extent used to clip the geometries.

Returns
Type Description
Array<(Geometry|null)> 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.