Find the intersect points between a polyline and and a circle

834
2
10-18-2011 07:11 AM
DaveZhang
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.
0 Kudos
2 Replies
WeifengHe
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?
0 Kudos
ModyBuchbinder
Esri Regular Contributor
Hi Dave

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

Have Fun
Mody
0 Kudos