Geometry service Intersect method

The Intersect method constructs the set-theoretic intersection of an array of geometries and a given geometry.

Intersect(SpatialReference SpatialReference, Geometry[] InGeometryArray1, Geometry InGeometry2)




The SpatialReference of the geometries in InGeometryArray. Cannot be null.


An array of points, multipoints, polylines, or polygons. The input types can be mixed.


A single geometry of any type.

Return Value

An array of geometries (Geometry[]).


This operation constructs the set-theoretic intersection of each element of the input array and InGeometry2. Each result is placed at the corresponding index in the output array; that is, Result[i] = InGeometryArray1[i] Intersect InGeometry2. The dimension of each resultant geometry is the minimum dimension of the input geometry in the InGeometryArray1 array and the geometry specified by the InGeometry2 parameter. Any inputs that are completely outside InGeometry2 are represented by empty geometries of the same type in the output array.

The figure below shows an example of the intersect operation. The input geometry array contains all geometries shown on the left of the figure with the exception of the central circular polygon. The central circular polygon represents the input geometry InGeometry2. The output array contains the highlighted geometries shown in the right part of the figure. Note that two of the output points will be "empty" because their corresponding inputs are outside the circular polygon.

InGeometryArray1 input type is a polygonIntersect operation applied to a collection of points, lines, and polygons
Figure 1: The intersect operation applied to a collection of points, lines, and polygons.