I would like to intersect a polygon and a polyline to know if the polyline is in the polygon.
The code works but when i do it on more than 100 000 times in a for, there is this error :
System.Runtime.InteropServices.COMException (0x80040239): Exception de HRESULT : 0x80040239
à ESRI.ArcGIS.Geometry.ITopologicalOperator.Intersect(IGeometry other, esriGeometryDimension resultDimension)
My code :
ITopologicalOperator4 topoOperateur = secteurPsr.Shape as ITopologicalOperator4;
topoOperateur.IsKnownSimple_2 = false;
topoOperateur.Simplify();
IGeometry geomPsr = currentPsr.Value.Shape;
IPolyline polylinePsr = geomPsr as IPolyline;
(geomPsr as ITopologicalOperator2).Simplify();
IGeometry geomResult = null;
try
{
geomResult = topoOperateur.Intersect(geomPsr,esriGeometryDimension.esriGeometry1Dimension);
}