Creating a line of a desired length and angle

Dec 3, 2012 at 10:21 AM

Hi All,

I am trying to create a line from a known starting point that is n units (Meters, Feet or US Survey Feet) long and an angle in degrees from North.

The actual creating of the line is not the issue just working out the end co-ordinate given a length and an angle.

Any pointers would be appreciated.

Jason

Editor
Dec 3, 2012 at 11:54 AM

Assuming you are talking about lat/lon coordinates:

http://williams.best.vwh.net/avform.htm

The other is trivial:

//angle in radians
var dx = radius * System.Math.Cos(angle);
var dy = radius * System.Math.Sin(angle);
Hth FObermaier