Given three points on a line in a geographic coordinate system, how does one calculate the angle formed by these three points?
Please, give a general solution but also include system specific examples if you like.
On a sphere you can use trigonometric identities. On an ellipsoid, to compute the angle B in triangle ABC, it is usually best to create points A' and C' at short distances from B along the edges BA and BC respectively, project A'BC' using a conformal projection (which by definition preserves angles), and compute the (Euclidean) angle at the projected point B. (You can use A' for A and C' for C when BA and BC are short distances.)
Of course, when three points are exactly "on a line," there is no need to compute: the angle is 180 degrees :-).