First, we convert your geographic location (or your address) to latitude and longitude world coordinates. There is also a very obvious difference between "transport distance" and the shortest distance between two points (as the crow flies
). Mapping software will usually return the transport distance, which is only a secondary consideration, and it's not the direct distance between you and an earthquake.
There are two and three dimensions to consider.
Let's work with X (latitude) and Y (longitude), and remove Z (height and depth) variations.
Now we have 2 surface points to calculate the distance.
Your proximity to the surface epicenter of an earthquake is always a direct line - even if it goes through a mountain.
However, the curvature of the earth complicates the math, and the line is not exactly straight.
There is an increasing arc across greater distances.
Here is an example of how a "straight" line (from the intersection at Hollywood Blvd and Vine Street in Los Angeles ) appears to arc to the coordinates of an earthquake in the Philippines. The globe displays one pin in each location, and the map displays the shortest path between them in 2 dimensions.
It becomes further complicated when you consider "the globe" is not a perfect sphere. The Earth slightly bulges at the equator. And, the precise location of an earthquake also has some variance and degree of error - especially at sea.
There are mathematical formula(s) for calculating almost exact distance between two points on the globe - without relying on satellite mapping (which can get expensive!). Using both sets of world coordinates, we perform this calculation in a split second to display your surface distance and proximity to an earthquake.
When you log in, you will instantly see your proximity to the largest and most recent nearby earthquakes.
If you double-check the accuracy, it's pretty staggering.