Skip

Help me map out bike ride altitude profiles before I go
June 3, 2006 10:40 AM   Subscribe

Is there a good, easy, or already available way to make an altitude profile from a route in Google Earth? Alternatively, is there another easy (and preferably free) way to do it?

My wife and I are thinking about riding in a century, but we don't know the roads along the route very well and the organizers haven't given an altitude profile. Because parts of it are in a hilly area, we'd like to see what we're in for before we sign up.

I've already seen this question which is quite similar, but there are a few differences.

1) I'd like to be able to combine this with the road abilities of say, Google Earth. (I'd like to get directions from here to there along roads and then get an altitude profile rather than draw a path in a Topo program).

2) While I generally only ride in the US, it would be interesting to me to be able to try this elsewhere in the world, which Topo USA doesn't do.

3) Like in the previous question, I'd much prefer a free/very low cost option. I guess I don't know if I'd use this enough to spring for TopoUSA.

4) Nearly a year has passed since the last question, and Google Earth (and its derivatives) have become quite ubiquitous. Surely someone must have done this?

A word on implementation-
I noticed you can save a .kml file in Google Earth which looks like a list of coordinates, but without altitude. If there were a way to easily look up an altitude for each coordinate, I wouldn't mind figuring out the distance between each pair of points (I assume there's a straightforward formula to find the distance between two coordinates? Or, perhaps Google Earth uses evenly spaced points?) and plotting the resultant data file.

Thanks in advance!
posted by JMOZ to Computers & Internet (9 answers total) 1 user marked this as a favorite
 
gmap pedometer computes distances and can give elevation for a rout.
posted by MonkeySaltedNuts at 11:07 AM on June 3, 2006


Hmm, the gmap pedometer does look up the elevations, but it seems to only add an elevation for every point I add by hand. It would be really nice if there were a solution which could take advantage of the road-following abilities of Google Maps or Google Earth.
posted by JMOZ at 11:41 AM on June 3, 2006


I havn't investigated where gmap pedometer gets it elevations from, but if you indicate a route that goes across a bridge over a valley, it has you going down to the valley floor and back up again.
posted by MonkeySaltedNuts at 12:25 PM on June 3, 2006


Gmaps Pedometer gets it's elevation data from this USGS web service. Basically it's a couple methods that take a Lat and Long as input and return the elevation as output. See some sample code for getElevation here.

Since you said the .kml file has the coordinates of your route in it, perhaps you could write something that plucks coordinates out of the file and requests the elevation for each point from the USGS website. Then use some automated drawing library to make an elevation profile. Presumably computing distance from pairs of lat/long coordinates is not that hard, or there's probably a web service out there that does that too.

You'd think someone would have done this already...
posted by epugachev at 5:22 PM on June 3, 2006


Here's something on computing distance from lat/long. Note that there are several ways to do this based on how accurate you want to be. Do you want to assume the earth is a sphere, for example? Also, remember that if you're riding uphill that extra distance won't be included in the value you get out of a distance between two lat/long points formula. The simplest thing I can think of to account for that extra mileage is to treat each pair of points as endpoints of the hypotenuse of a right triangle, and use the Pythagorean theorem to figure out the length of the hypotenuse from the distance and elevation data. I.e.,

distance traveled = sqrt((distance between points)^2 + (change in elevation)^2)
posted by epugachev at 5:33 PM on June 3, 2006


epugachev- the info about the USGS web server is quite helpful. I agree- I'd really think someone must have done this already? I'm not a web programmer and don't really know how to hack something up.

As for the distance between coordinates, I think it's probably safe to approximate. Your link looks like it has several useful formulae.

I think it's quite safe to neglect the additional distance from the climbing, as the only effect will be on the effective grade in the elevation profile (I can use the google earth route for the length). Anyhow, in almost all cases, roads aren't graded terribly steeply, so the extra distance from the slope should be largely negligible. For example, 1 flat mile at a 10% grade would be sqrt(1^2 + 0.1^2), which is only 1.005 miles.

I guess I'll keep holding out for someone finding someone who has done this already (at least the elevation lookup).

Hmm, looking around a bit more, I guess this site is worth a try, but I don't like the 2 second per lookup delay. I wonder if they do it in JS or something that I could run locally....
posted by JMOZ at 6:12 PM on June 3, 2006


There used to be a program for the UK for radio hams in the UK (It fitted on a floppy, and covered the height cross-section between any 2 OSNG refs). It also told them how high their antena mast had to be to provide line of sight between 2 places.

Any use, I can try to track it down.
posted by Dub at 8:42 PM on June 3, 2006


Well, gmap-pedometer is nice for a quick overview, but it has a couple of major weaknesses- First, it doesn't follow roads automatically and second, it only measures elevations at the points you click; it doesn't interpolate. Still, it's useful, and I didn't know it had the elevation feature.

It would be nice if there were a good implementation of epugachev's methods, but I can't find one other than the one I mentioned above, which doesn't seem to work terribly well.
posted by JMOZ at 7:41 PM on June 4, 2006


For posterity, www.toporoute.com is fantastic. Thanks to bl1nk!
posted by JMOZ at 11:17 PM on September 28, 2006 [1 favorite]


« Older I want to connect my (not-inte...   |  I am on a VLAN and cannot brow... Newer »
This thread is closed to new comments.


Post