1

I am having trouble creating a circle with a specified radius of 200 feet. I have tried several ways to translate the points along the circular arc.

here is my current code:

var display = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay;

var center = display.TrackPoint();
var convertedRadius = Unit.Convert(200, Unit.Feet, center.CoordinateSystem.Unit);    
var firstPoint = GeometryOperations.Move(center, convertedRadius, 0);

var points = new List<Points>();
points.Add(firstPoint);

for (int i = 1; i < 360; i++)
{
    var point = GeometryOperations.Rotate(firstPoint, center, (Math.PI / 180) * i) as Point;
    points.Add(point);
}

var poly = new Polygon(points, display.CurrentCoordinateSystem);
var circleGraphic = new Graphic(poly, Symbol.Fill.Solid.Red);
display.Graphics.Add(circleGraphic);

I only seem to have a problem creating a polygon. Using the above loop I can place 360 markers in a circle around the center point.

Alternately, If there is a way to create a buffer from a point using programmatic methods that would suffice. I am trying to query all shapes that are within 200 feet of a target point.

1

You might actually be successfully creating the circle, except that your projection appears to distort it.

To check, go into 3D, and see if the circle still looks distorted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.