Main Content

Vector Intersections

Mapping Toolbox™ includes a set of functions that calculate the intersections of vector data, such as great circles, small circles, and rhumb line tracks. The functions also determine intersections of arbitrary vector data.

FunctionDescription
gcxgcFind intersection points for pairs of great circles on the sphere
scxscFind intersection points for pairs of small circles on the sphere
rhxrhFind intersection points, if any, for pairs of rhumb lines
gcxscFind intersection points, if any, between a great circle and a small circle on the sphere
polyxpolyFind intersection points for lines or polygon edges in the plane

In general, small circles intersect twice or never, as shown in the following figure. For the case of exact tangency, scxsc returns two identical intersection points.

Two intersecting small circles

To illustrate finding the intersection of rhumb lines, imagine a ship setting sail from Norfolk, Virginia (37°N,76°W), maintaining a steady due-east course (90°), and another ship setting sail from Dakar, Senegal (15°N,17°W), with a steady northwest course (315°). Where would the tracks of the two vessels cross? The intersection of the tracks is at (37°N,41.7°W), which is roughly 600 nautical miles west of the Azores in the Atlantic Ocean.

Intersection of two rhumb lines on a map