Just as an example, when I go to Google Maps and get directions, it tells me how far along a road I need to travel to get to my next turn. For example, when I get directions from SeaWorld San Antonio to the Alamo, it says I need to travel $16.8$ miles along Highway 151 before exiting onto US-90 E. How does it figure that out?
I figure one way to approach the problem is, instead of (or in addition to) storing $x$ & $y$ points for every point on the highway, a server program can approximate the path travelled by the highway using a mathematical function. This way, the client program doesn't need to know how far away each recorded point on the highway is from another point; it just needs to know the integral of the function from a given $x$ to another given $x$.