Ex Nihilo

A Processing Sketch Blog

« | »

Manual Geodata

So if you’ve recently gotten into a visual programming language, and you also recently bought a bike, what’s the logical next step? Merge the two pursuits of course.

There’s an app called RunKeeper for the iPhone 3G/3GS that uses the phone’s GPS to track your route / elevation / time as you’re out being active. If you upload your routes to the web site, you can get the data back out in a couple of XML formats. (Google’s KML kind of sucks, it turns out; I’ve been finding GPX files easier to use. RunKeeper’s web app exports both.)

I’ve started hacking up an app to plot the data in 3D space. Very early stages, but it’s working quite well so far. Here’s a quick video:

Make sure to wait for the shift in plotting modes through the movie; I’ve built three so far: lines, points, and colour-coded points that indicate elevation (blue in the low areas, red in the high areas)

You’re seeing 7 routes I’ve ridden over the past couple of days. I’m already seeing outlines of Vancouver’s city features forming: the distinctive duck’s head outline of Stanley Park, the south downtown seawall, the massive hill heading out to UBC, etc.

What’s obvious is that some of the elevation data, particularly around Stanley Park, is seriously whacked. I think the cliffs obscure the GPS signal or something, because it should be more or less sea level all the way around. (In line view this is most obvious: it’s a series of jagged peaks and valleys, which strikes me as physically impossible). Hard to say whether it’s the app or the phone’s GPS to blame here, but my guess is the latter.

Next step: adding speed indicators, once I figure out how to work with ISO time stamps in Processing. (And going out and biking more paths this weekend to start fleshing out the terrain a bit more. Nice way to stay motivated.)

Friday, September 18th, 2009 | 3D | RSS 2.0

9 Responses to “Manual Geodata”

  1. Gregeh says:

    Neat stuff Dave. If you’d like more GPS data, I have a number of Runkeeper tracks around the city from the last few months, and know of at least one other user.

    I get similar elevation glitches around Stanley Park, and x/y glitches around Downtown and anywhere there’s tall buildings. iPhone GPS leaves much to be desired.

  2. Hi Dave:

    If you can figure out how to use KML and you are interesteed in cycling east van to gastown and back, i have 400 kml files you are welcome to use at:

    can’t wait to see future iterations of this project!

  3. Dave says:

    Thanks guys. I think my vaguely-defined goal with this one is to enable personal mapping of the city, not necessarily comprehensive or pinpoint accurate mapping, so I’m more interested in creating per-person maps than one big map of Vancouver. Greg, if you want to send me your data I could probably send you something interesting. Roland, I may get KML working eventually, I’ll let you know if that happens.

    I’d be really curious to see how other data sets work with my code, especially from other cities and different elevations. Sea level is easy, doing something useful with elevation data from Colorado might be a bit trickier.

    Ultimately I hope I can make the code more general and release it as something else people can tinker with themselves eventually.

  4. I’ve been using RunKeeper now since February. I’ve logged over 2000 kms with it – the majority of that being on my bike.

    With respect to elevation data, there are a couple of things I’ve noticed. I mentioned to the developers that the GPS elevation data from the device is not very reliable and suggested they try using data available from google maps, or elsewhere. They mentioned to me that they were using some sort of combination of data they get from the device and elsewhere now – I haven’t really checked out how accurate it is these days. One other thing to note is that I’ve found the elevation data to be severly out of wack on the initial sync to the RK site. If I manually re-send my activity to the site, the elevation data seems to be better – at least more smooth. If you haven’t tried that – might want to give it a try.

    If you’re looking for data from other locations, I’d be happy to supply some from in and around Ottawa / Gatineau.

  5. Dave says:

    Thanks Kevin, I’ll be sure to try re-uploading. You’re right about the elevation being off, even in most recent versions. I’m noticing the exact same route is plotted differently when travelled at different times. I’ve been theorizing it might have been something to do with the fact I was listening to music on one trip and not the other, or it got an inaccurate lock at the beginning that persisted throughout the route, or something else. But maybe it is just the app itself.

    Would love to play around with some routes from Ottawa, yes! That would be a great way to fix my manual fudging of the math that makes it Vancouver-specific at the moment. If you get a chance, throw a few GPX files onto a server somewhere and send me an email:


  6. Dave – just made some data available to you and sent you an email telling you where to find it.

  7. Dave S. says:

    I just thought of a way around the elevation problem. RunKeeper seems pretty good at getting the lat/long coordinates right, so if I can find a free service to throw them at and have elevation data returned (Google Maps API key may help out here) then I can ignore the data from RunKeeper and use the correct data instead. Must experiment…

  8. Dave S. says:

    An update: I found someone who provides elevation data free on the web, so I wrote the code to replace RunKeeper’s elevation metrics with API calls. For a number of reasons, that particular provider didn’t work out, and I can’t seem to find anywhere else online that I can query for elevation data (Google included).

    For now, I’m giving up on the idea of routing around RunKeeper’s incorrect elevation measurements. I still have the code, so if I can ever find an accurate, reliable provider, I’ll swap it back in.

    Also, I’ve just added support for KML files. I think with a bit more polish, I might be ready to actually release this code in some form. Stay tuned.

Leave a Reply

Powered by WP Hashcash