Constructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions.

[Visual Basic .NET]Public Function Intersect ( _ByValotherAsIGeometry, _ByValresultDimensionAsesriGeometryDimension _) AsIGeometry

[C#]publicIGeometryIntersect (IGeometryother,esriGeometryDimensionresultDimension);

[C++]HRESULT Intersect(IGeometry*other,esriGeometryDimensionresultDimension,IGeometry**intersection);

[C++]

Parametersother

otheris a parameter of typeIGeometryresultDimension

resultDimensionis a parameter of typeesriGeometryDimensionintersection[out, retval]

intersectionis a parameter of typeIGeometry

#### Product Availability

#### Description

The Intersection of two Geometries of the same Dimension is a Geometry containing only the regions of overlap between the original geometries.

#### Remarks

Intersection is basically an AND between input geometries.

ITopologicalOperator methods must be applied on high-level geometries only. High-Level geometries are point, multipoint, polyline and polygon. To use this method with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped into high-level geometries types.

This method does not support GeometryBags.

Since ArcGIS 9.2, Intersect has a larger cost - it takes longer to run the method. Therefore, it is a better approach to test if the two geometries are disjoint before calling Intersect.

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

#### See Also

ITopologicalOperator Interface | ITopologicalOperator.Intersect Method | IConstructMultipoint.ConstructIntersection Method | IConstructMultipoint.ConstructIntersectionEx Method