cutOperator

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

Cut 2D geometries with a polyline.

For polylines, all left cuts will be grouped together in the first geometry, right cuts and coincident cuts are grouped in the second geometry, and each undefined cut, along with any uncut parts, are output as separate polylines.

For polygons, all left cuts are grouped in the first polygon, all right cuts are in the second polygon, and each undefined cut, along with any left-over parts after cutting, are output as a separate polygon. If there were no cuts then no geometry will be returned. If the left or right cut does not exist, the returned geometry will be empty for this type of cut. An undefined cut will only be produced if a left cut or right cut was produced, and there was a part left over after cutting or a cut is bounded to the left and right of the polyline that is used to cut.

Method Overview

Name Return Type Summary Object

Performs the cut operation on a geometry.

cutOperator

Method Details

execute

Method
execute(geometry, polyline){Geometry[]}

Performs the cut operation on a geometry.

Parameters
geometry Geometry

The input geometry to be cut.

polyline Polyline

The polyline that will be used to divide the input geometry into pieces where they cross the polyline.

Returns
Type Description
Geometry[] Returns an array of geometries created by cutting the input geometry with the polyline.
Example
// Cut a polygon with a polyline
const cutGeometries = cutOperator.execute(polygon, polyline);

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