Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a polyline and polygon. The polyline will intersect the polygon at two or fewer points. I would like to get these intersection points as X and Y values.

EDIT: Here is a quick code sample using ITopologicalOperator based on the answers below. It's a quick chop job, but it'll help get others started.

        Public Function GetPolygonIntersection(ByVal pLine As IPolyline, ByVal pPolygon As IPolygon) As IPoint

        Dim pGeom As IGeometry
        Dim pTopo As ITopologicalOperator = pLine
        Dim pPoints As IPointCollection
        Dim pPoint As IPoint = Nothing

        If Not pTopo.IsSimple Then pTopo.Simplify()
        pGeom = pTopo.Intersect(pPolygon, esriGeometry0Dimension)
        If pGeom.IsEmpty Then
            Return Nothing
        End If

        If pGeom.GeometryType = esriGeometryMultipoint Then
            pPoints = pGeom
            If pPoints.PointCount = 1 Then
                pPoint = pPoints.Point(0)
            End If
        End If

        Return pPoint
    End Function
share|improve this question
up vote 3 down vote accepted

Use ITopologicalOperator.Intersect. You cast one of the geometries to this interface and call the method with the other geometry as a parameter.

You mention you want point coordinates as the result. Polygon and polyline intersection will yield points only if the polyline touches the polygon on its outline. Perhaps that's what you are after, but you can also consider getting the polygon's outline first and work with that instead.

share|improve this answer
Great - this is what I was searching for. – Radar Jul 12 '11 at 17:10

You can use ITopologicalOperator:

  1. First cast your geometry to (IGeometry) to ITopologicalOperator

  2. Use the intersect method

Check out the documentation on it. It if full of minor important details

share|improve this answer
Here is the Arc10 link:… Thanks for the help! – Radar Jul 12 '11 at 17:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.