Take the 2-minute tour ×

I looking for algorithm how to find out whether two rhumb lines given by point1 with azimuth1 and point2 with azimuth2 have intersecting point. Have anyone idea how to find intersection ?

For example:

point1 = Latitude = 54.243694767757674, Longitude = -2.0064940902720076 bering1 = 36 degrees

point2 = Latitude =54.168824307242112, Longitude = -1.6983087834266664 bering2 = 301 degrees

I know that rhumblines of these for 100 % have intersect (second is n the other hemisphere)

Thanks in advance.

share|improve this question
Because a rhumb line on a Mercator map is a straight line angled at the given bearing, isn't the answer to whether they intersect obvious? They intersect if they have different bearings or they coincide; otherwise not. Are you perhaps looking for a way to compute the coordinates of their intersection when it does exist? If so, what level of accuracy do you need? For instance, the formulas for the Mercator projection on an ellipsoidal datum are relatively complicated compared to a spherical datum but they will be a little more accurate. –  whuber Apr 24 '13 at 14:51

1 Answer 1

Actually, I was looking for something like this. At the end we've found solution:

double y = (Log(1/Tan(lat1/2+PI/4) * Tan(lat2/2+PI/4))+long1 * 1/Tan(alpha)-long2 * 1/Tan(beta)) / (1 /Tan(alpha) -1/ Tan(beta));

double x = (-Math.PI + 4 * Math.Atan(Math.Tan(lat1 / 2 + Math.PI / 4) / Math.Exp((long1 - y) * 1 / Math.Tan(alpha))) + 4 * Math.PI) / 2;

This works for 100% ... just don't forget at the end normalize those coordinates ...

share|improve this answer
I'm having trouble making sense of this. If you're using "bearing" as a particular direction, then this cannot work in many cases. Perhaps it attempts to compute the intersection of rhumb lines instead of rays? Second, the formula (which has typos) would be correct only for the sphere and not for the ellipsoid. Third, precisely what are the relationships between "alpha" and "beta" (presumably bearings) and "lat1" etc.? Fourth, it cannot work all the time: there will be exceptional cases with no intersection and with an entire line of intersections. Fifth, what do you mean by "normalize"? –  whuber Apr 25 '13 at 14:18

Your Answer


