0

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$.

  • I don't know much here but I would guess that the functions would be complicated enough that the computer would compute the path integral by breaking it back up into line segments and adding their lengths. – Ryan Vitale Dec 08 '15 at 21:49
  • Supposedly they store all junction points and the road distances between these - obtained either by actual measurement or approximation using a polygonal path fitting the map/satellite image. Note that you as a driver won't mind if the actual distance is 16.79 miles as there are not so many exits within 0.01 miles and differences might be caused by you switching lanes or having slightly wrong pressure on your tyres. – Hagen von Eitzen Dec 08 '15 at 21:52

0 Answers0