# Geometry service Cut method

The Cut method splits input polylines or polygons where they cross a cutting polyline.

Cut(SpatialReference SpatialReference, Geometry[] Targets, Polyline Cutter, out int[] CutIndexes)

Parameter

Description

SpatialReference

The spatial reference of the input target and cutter. This cannot be null.

Targets

The input polylines or polygons to be cut.

Cutter

The polyline that will be used to divide the targets into pieces where they cross the cutter.

CutIndexes

An array which will be returned with indexes identifying the source geometries used to produce the output geometries.

## Return Value

An array of geometries (Geometry[]) of the same types as the targets.

## Remarks

The targets of the cut operation can be a mix of polylines and polygons. For each output geometry, the corresponding element of CutIndexes contains the index value of the input geometry which was cut. An input polyline produces at most two cut outputs. An input polygon can produce two or more cut outputs.

When a polyline is cut, it is split where it intersects the cutter polyline. Each piece is classified as 'left of' or 'right of' the cutter. This classification is based on the orientation of the cutter line. Parts of the target polyline that do not intersect the cutting polyline are returned as part of the 'right of' result for that input polyline. Figure 3 shows an example. The orientation of the cutter line is indicated with a red arrowhead. Notice that a polyline part is also cut when the cutter line just touches it (as opposed to crossing it). The lower right input part is included in the `right of' result polyline. The cutting line can also have multiple parts. The left of/right of decision is made per cutting part.

Figure 1: Cutting a multi-part polyline. The direction of the cutting line is shown with the red arrowhead. The 'left' result is shown. Note that the uncut input part is also returned as part of the 'right of' result.

Figure 2 shows an example of a cutting operation with a multipart cutting polyline. The orientation of each cutting part is shown with a red arrowhead. The 'left' result has been requested and is shown in the right box of the figure.

Figure 2: Using a multi-part cutting line to extract an interior portion of another polyline. The result that is 'left of' the cutting line has been kept. Parts that do not intersect the cutting line are returned in the right result.

When the target is a polygon, the left/right classification is not done. The polygon pieces are returned as separate polygons in order of ascending area. Some of these pieces may be multipart polygons. In the figure below, the first cut part returned is to the right of the oriented cutting line, but it has the smallest area. Input parts that do not intersect the cutting line will be returned with one of the output polygons.

Figure 3: Cutting a multi-part polygon, example 1: The part with the smallest area comes first in the output. One of the output polygons will include the uncut input part.

Figure 4: Cutting a multi-part polygon, example 2: Two multi-part polygons are produced.

11/8/2016