5
$\begingroup$

Short Version:

How would one find the point of intersection of two rhumb line segments defined by two pairs of points on the globe? Assumptions such as a spherical Earth and following the shortest-path are A-OK.

Long Version:

Been crawling the web looking for resources. There are a few decent spherical geometry pages specific to GIS such as Ed Williams' and this Movable Type site. Finding the intersections of line segments interpreted as great circle arcs is fairly trivial, and covered on those sites. Unfortunately this situation with rhumb line arcs is not.

Given two pairs of lat/lon locations, each pair defining a shortest-path rhumb line segment, how would you find the point of intersection?

It seems like it would be as simple as using the formula for projecting a destination location given a starting point, bearing and distance (formulas available on the Movable Type site). Taking that for both lines and setting the lat/lons equal to each other and solving for a distance. I haven't had much success deriving such a method.

This really seems like a solved problem so I'm hoping I'm just not looking in the right places!

$\endgroup$

2 Answers 2

2
$\begingroup$

Rhumb lines on the globe become straight lines in the plane under the Mercator projection. So what you should do is:

  • convert your four points on the sphere to points on the plane by the Mercator projection;
  • find the intersection in the usual two-dimensional Euclidean sense;
  • do an inverse Mercator projection. As you see in the Wikipedia article, the map taking latitude to $y$-coordinate in the Mercator projection is the inverse of the Gudermannian function, so to do the inverse Mercator projection you take the usual Gudermannian function.
$\endgroup$
1
$\begingroup$

I know it's a decade late but I was looking for a way to achieve this in Python and came across PyGeodesy. Figured I'd share in case anyone else out there finds it helpful (haven't tested extensively).

Library: https://pypi.org/project/PyGeodesy/

Documentation: https://mrjean1.github.io/PyGeodesy/docs

Example:

from pygeodesy import RhumbLine, Rhumb
rhumb1 = RhumbLine(Rhumb(), 10, -56, 35)
rhumb2 = RhumbLine(Rhumb(), 0, -10, 310)
rhumb1.intersection2(rhumb2)

#output: intersection2(lat=24.051978, lon=-45.817207)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.