Find the intersect points between a polyline and and a circle

499
2
10-18-2011 07:11 AM
Highlighted
New Contributor II
Hi, everyone

I need to find the way to get the intersect points between a polyline and and a circle using ArcObjects 10,

my C# codes something like this:

ITopologicalOperator topo = (ITopologicalOperator)baseline;
IGeometry intersects = topo.Intersect(circle, esriGeometryDimension.esriGeometry0Dimension);
IMultipoint multipoint = (IMultipoint)intersects;
IPointCollection Pts = (IPointCollection)multipoint;

but the function Intersect clash all the time, it gave me error like this:

Err: Exception from HRESULT: 0x80040585

can anyone help? thank you very much.
Reply
0 Kudos
2 Replies
Highlighted
Occasional Contributor II
IGeometry intersects = topo.Intersect(circle, esriGeometryDimension.esriGeometry0Dimension);

In this line, what type of Geometry is circle?  Is it of CircularArc or Polyline?
Reply
0 Kudos
Highlighted
Regular Contributor II
Hi Dave

Try to check spatial reference on both geometries �?? it should be the same.

Have Fun
Mody
Reply
0 Kudos