Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

For example, lets say I have two parallel roads with starting point and ending point 1 mile apart.

The left hand road is as flat and straight as an arrow.

The right hand road is also straight....but has a series of sine-wave shaped hills and valleys.

Obviously, if I measure using a Surveyor's wheel, the second path will be longer, even though both roads are starting and ending a mile apart.

My question: which measurement does google maps use? Does it account for difference in elevation adding to the travel distance?

share|improve this question

migrated from programmers.stackexchange.com Oct 12 '11 at 18:53

This question came from our site for professional programmers interested in conceptual questions about software development.

    
Your difference there is a difference in road length, not elevation . . . –  Wyatt Barnett Oct 12 '11 at 13:44
1  
Difference in road length due to elevational changes is what OP implies. –  Chris Oct 12 '11 at 13:52
1  
Clearly you guys do not live in SF –  Ragi Yaser Burhum Oct 13 '11 at 2:25
    
25 grade in San Francisco datapointed.net/visualizations/maps/san-francisco/streets-slope = about a 3% error –  user19129 Jun 14 '13 at 18:48

2 Answers 2

up vote 7 down vote accepted

I doubt it. Since the length of a sloped road would be sqrt(1+x^2)-times the length of the flat one (where x is the slope). For low values of x, this is roughly 1+1/2*x^2, which is rather low, eg. for a 10 % slope, you get an error of 0.5 %. Not considering the actual lane you drive probably has a similar error.

share|improve this answer
    
also in extreme cases a hilly road is likely to have speed restriction on it which routing algorithms can use to make a choice –  jk. Oct 12 '11 at 13:54
2  
Don't know why this was closed as off topic. I was planning on implementing a similar system for calculating travel distance in a game, and wanted to know how the big boys do it. Thanks for providing an example in the slope equation though. :). –  waterwizard11 Oct 12 '11 at 15:01

Even a very steep 10% grade is only 1/2% longer than a flat road covering the same horizontal distance.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.