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
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:

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: