Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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