AnsweredAssumed Answered

Check intersection of two polyline features

Question asked by Aysberq on May 17, 2012
Latest reply on May 17, 2012 by Aysberq
Hello.

I want to get bool result of intersection of two polyline features.
The Code:

private bool CheckIntersection(IFeature feat1, IFeature feat2) {     IPolyline pLine1, pLine2;     pLine1 = feat1 as IPolyline;     pLine2 = feat2 as IPolyline;     ITopologicalOperator topoOp = pLine1 as ITopologicalOperator;     IGeometry pGeom = topoOp.Intersect(pLine2, esriGeometryDimension.esriGeometry0Dimension);  //Here I get this error: System.NullReferenceException:                                                                                                 //Object reference not set to an instance of an object.             if (pGeom == null)             {                 return false;             }             else return true; }


Can anyone help me?
Thanks.

Outcomes