I want to create a circle with IPoint P and radius r in ArcEngine and then I need to cast it to an IGeometry. Does anyone know how to do this?
ESRI ArcEngine 10 VS2010 C#
|
I want to create a circle with IPoint P and radius r in ArcEngine and then I need to cast it to an IGeometry. Does anyone know how to do this? ESRI ArcEngine 10 VS2010 C# |
||||
|
|
|
found it
|
|||||||||||||
|
|
EllipticArcClass ellipticalArc = new EllipticArcClass(); IEnvelope env = new EnvelopeClass(); IPoint lowerLeft = new PointClass(); lowerLeft.X = centerPoint.X - width; lowerLeft.Y = centerPoint.Y - height; IPoint upperRight = new PointClass(); upperRight.X = centerPoint.X + width; upperRight.Y = centerPoint.Y + height; env.LowerLeft = lowerLeft; env.UpperRight = upperRight; ellipticalArc.ConstructEnvelope(env); IGraphicTrackerSymbol graphicTrackerSymbol = this.graphicTracker.CreateSymbol(simpleFillSymbol, null); int shapeId = this.graphicTracker.Add(ellipticalArc, graphicTrackerSymbol); |
|||
|
|
|
Another method is to cast your point to ITopologicalOperator and use the Buffer method to buffer the point by the radius. |
|||
|
|
I prefer the |
|||
|