# How to calculate the perimeter points of a circle in Lat Lon in C#

Spike UK used Ask the Experts™
on
I want a function that returns the Lat/Long of a point on a map - given the centre, distance (m) and azimuth (angle) in c#
Thanks
Comment
Watch Question

Do more with

EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Developer

Commented:
Should it be a perfect circle? How accurate should it be?

Cause we're talking about a circle on a sphere.  For really small circles, you can use the normal 2 dimensional approach. For larger circles it's getting real hard..

Commented:
We are talking small circles with the points returned  as an array of lat/ longs
Principal Software Engineer
Commented:
As ste5an says, this is not a simple problem.  A proper, analytic solution requires spherical trigonometry.  However, an approximate solution can be obtained easily.

Build and store a table of how large a degree is in whatever system you are measuring in, English or metric at latitudes and longitudes, by tenths of a degree.  (One degree is not the same size at the equator as it is at the poles.)

Calculate the Cartesian coordinates of the desired points on the perimeter of the circle.  Interpolate latitude and longitude offsets from the Cartesian coordinates using the degree-size table at the closest coordinates to the center.  Add these offsets to the latitude and longitude coordinates of the center point to obtain the points on the perimeter.

This is a quick and dirty solution but should be good enough for circle radii of ten miles or less.

Do more with