title: C# - Find coordinates to extend line by certain amount of kilometers
body: <p>I need to calculate the coordinates of a point that extends an existing line by a certain amount of kilometers.</p>
  
  <p><strong>Given Input:</strong>
  (1) beginning and ending coordinates of an existing line (in degrees).
  (2) length (km) of how far the new line should extend past the "ending" coordinate given above.</p>
  
  <p><strong>Output:</strong>
  Latitude and longitude (in degrees) of point that extends the line</p>
  
  <p>I currently have a method that calculates the bearing between 2 sets of coordinates if that helps.  I also have a method that finds a point on a line, but it's a point between the 2 sets of given coordinates, not extending the existing line. I cannot seem to figure out how to alter that for my needs.</p>
  
  <p>Also, I'm using WGS-84, so (from my understanding) the curvature of the earth does not need to be taken into account.</p>
  
  <p>Any help would be appreciated, thank you!</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>Well the problem I saw was that the distance was in kilometers while the coordinates were GPS degrees. But I just ended up using vectors to solve it: </p>
  
  <p><strong>C</strong> = <strong>B</strong> - k(<strong>A</strong> - <strong>B</strong>), where k = proportion of distance to place C </p>
  
  <p>Note: k=1.5 in my case because I wanted the new point to be one half the distance outside of the original line. 0 would be at point A and 1 at point B I believe.</p>
  
  <p>I've plotted it in Google Earth and it seems to work.</p>