Tag Archives: intersect

ArcGIS Intersections

Dim pTopo As ITopologicalOperator
Set pTopo = pF1.Shape ‘ store the line 1 shape in the topo op
If Not pTopo.IsSimple Then pTopo.Simplify
Dim pGeom As IGeometry
Set pGeom = pTopo.Intersect(pF2.Shape, esriGeometry0Dimension) ‘ get intersection with line 2
If pGeom.IsEmpty Then
MsgBox “The intersection of the 2 geometries is empty or consists of points”
Exit Sub
Else
Dim ppcl As IPointCollection
Set ppcl = pGeom
MsgBox ppcl.Point(0).X & “, ” & ppcl.Point(0).Y
End If

esriGeometry0Dimension are points (IPointCollection)
esriGeometry1Dimension are lines (IPolyline)
For more information:
http://edndoc.esri.com/arcobjects/9.1/componenthelp/esriGeometry/esriGeometryDimension.htm