﻿ Intersects Method (GeometryEngine)—ArcGIS Pro
ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / Intersects Method
The base geometry.
The comparison geometry.
Example

In This Topic
Intersects Method (GeometryEngine)
In This Topic
Returns true if geometry1 and geometry2 intersect.
Syntax
```public bool Intersects(
Geometry geometry1,
Geometry geometry2
)```
```Public Function Intersects( _
ByVal geometry1 As Geometry, _
ByVal geometry2 As Geometry _
) As Boolean```

#### Parameters

geometry1
The base geometry.
geometry2
The comparison geometry.

#### Return Value

True if the two geometries intersect.
Exceptions
ExceptionDescription
Either geometry1 or geometry2 or both are null.
The method is not implemented for GeometryBag.
Incompatible spatial references between the input geometries.
Remarks
Two geometries intersect if they have at least one point in common. Equivalent to not Disjoint.
Example
Intersection between two Polylines
```// determine intersection between two polylines

List<MapPoint> pts = new List<MapPoint>();

Polyline line1 = PolylineBuilderEx.CreatePolyline(pts);

List<MapPoint> pts2 = new List<MapPoint>();

Polyline line2 = PolylineBuilderEx.CreatePolyline(pts2);

bool intersects = GeometryEngine.Instance.Intersects(line1, line2);    // intersects = true
Geometry g = GeometryEngine.Instance.Intersection(line1, line2, GeometryDimensionType.EsriGeometry0Dimension);
Multipoint resultMultipoint = g as Multipoint;

// result is a multiPoint that intersects at (2,2) and (4,2)```
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.