Where two geodesic segments cross
The crossing of the geodesics through two segments on the ellipsoid, nearest the segments' middles, and whether it falls within both segments or out on their extensions.
Planning and education aid. Not for primary navigation. Full disclaimer
The geodesics cross at 53.373184847°, -14.563115348°: on both segments.
- Crossing longitude
- Within both segments
- Where it falls
- Along A
- Along B
- Length of A
Provenance
- Computed by
- navigation.geodesic.intersection 1.0.1, core 0.1.0
- Model
- Each segment's geodesic from its start at the inverse azimuth; the two crossings of the matching great circles seed Newton's method on the distances along both geodesics (to a nanometer); the crossing kept is the one nearest the segments' midpoints, |x − a/2| + |y − b/2|, as in GeographicLib's Intersect class
- Accuracy
- Matches GeographicLib IntersectTool -i on 60 random segment pairs: to a micrometer, or 5e-12 of the distance for crossings thousands of kilometers out at a shallow angle, where both are limited by rounding
- Notes
- None
- Cites
- Karney, C. F. F., Journal of Geodesy, Algorithms for geodesics; Karney, C. F. F., Journal of Surveying Engineering, Geodesic intersections
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: Each segment's geodesic from its start at the inverse azimuth; the two crossings of the matching great circles seed Newton's method on the distances along both geodesics (to a nanometer); the crossing kept is the one nearest the segments' midpoints, |x − a/2| + |y − b/2|, as in GeographicLib's Intersect class
Show your work
Distances to the crossing
Newton's method on the distances along A and B, from the great-circle crossingsA 5,554,908.791 m long at 51.381648°, B 2,952,243.683 m long at 157.189277°= 4,573,738.529 m along A, 1,271,766.763 m along BCrossing latitude
direct problem along A4,573,738.529 m from A's start= 53.373184847°
The same steps an agent gets from the MCP server with explain: true.
Accuracy: Matches GeographicLib IntersectTool -i on 60 random segment pairs: to a micrometer, or 5e-12 of the distance for crossings thousands of kilometers out at a shallow angle, where both are limited by rounding
When to use this: Use this to find where two great-circle routes cross: an airway against a boundary, a flight path against a corridor, a survey line against a parcel edge, or any two courses drawn between pairs of points. It says where they meet, how far along each the meeting lies, and whether it falls inside both segments or out beyond an end.
Limitations: Two geodesics on an ellipsoid meet twice, at antipodal points, and this returns the closer crossing, so a pair of very long routes can cross somewhere other than where you meant. A crossing beyond the end of a segment is still reported, with within saying no and the distance running past the segment's length, because knowing where two courses would meet if extended is often the question; it is not a claim that anything crosses. Segments that lie along the same geodesic have no single crossing. The edges are geodesics, so two rhumb lines drawn on a chart do not cross where this says.
Worked example: JFK to London and Reykjavík to Lisbon. Source: GeographicLib IntersectTool -i (Karney 2023).
You enter
- Segment A end latitude
- 51.47 deg
- Segment A end longitude
- -0.4543 deg
- Segment A start latitude
- 40.6413 deg
- Segment A start longitude
- -73.7781 deg
- Segment B end latitude
- 38.7223 deg
- Segment B end longitude
- -9.1393 deg
- Segment B start latitude
- 64.1466 deg
- Segment B start longitude
- -21.9426 deg
You get
- Crossing latitude
- 53.373184847°
- Crossing longitude
- -14.563115348°
- Within both segments
- yes
- Where it falls
- on both segments
- Along A
- 4,573,738.529 m
- Along B
- 1,271,766.763 m
- Length of A
- 5,554,908.791 m
- Length of B
- 2,952,243.683 m
Review: Not yet independently reviewed by a geodesist.
Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.1, core 0.1.0. See this tool in the verification report.
Changes
- 2026-09-23, fixed: Short distances lost their meaning: a 0.859 m geodesic showed as 0.001 km. Distances in the navigation tools (version 1.0.1) still show to the meter in kilometers, but a short one now keeps three significant digits, down to the millimeter, so it shows as 0.000859 km. Differences such as the rhumb line's extra distance keep fixed decimals. Values are unchanged. Changelog
Checked against: 62 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- Algorithms for geodesics, Karney, C. F. F., Journal of Geodesy, Vol. 87, No. 1. pp. 43-55.
- Geodesic intersections, Karney, C. F. F., Journal of Surveying Engineering, Vol. 150, No. 3. 04024005 (closest intersection and segment intersections).