Ex Nihilo

A Processing Sketch Blog

Elevation is a free, open source route visualizer that renders personal GPS data in 3D space, built in Processing by Dave Shea.

How Do I Use Elevation?

You’ll need to have a GPS-equipped phone or device capable of tracking your activity as you run, hike, cycle, skate, ski, snowboard, or whatever other physical activity you choose to map. You’ll also need the ability to export that data as XML, in either GPX, TCX, or KML format. (If you have files in just about any another format, you can probably use GPSBabel to convert them to GPX files and get them working with Elevation.)

Download the version for your operating system and open the zip file. Inside you’ll find a folder called data. Open this data folder, and open the xml folder inside of it. There you’ll see some example data called ExampleRoute05.gpx and so on that comes with the application; you can safely delete these example files and replace them with your own.

Once you’ve added your files, restart Elevation. To move the map around, use the controls below. To rotate the view, click and drag within the viewport. To move faster, hold down the shift key as you press the buttons.



What are the four View Modes?
There are four buttons to toggle different data rendering modes. Mode 1 renders plain dots at each GPS point. Mode 2 renders each GPS point as a colour-coded dot that indicates its elevation: red are the highest points, blue are the lowest. Mode 3 renders colour-coded dots that indicate your relative speed: blue is the slowest, and red is the fastest. Mode 4 renders animated tracers that follow each individual path.

You can check the “Connectors” box to optionally connect each point with a line.

Why doesn’t View Mode 3 work?

The colour-coded speed indicators don’t work at all with the KML format. This is a limitation in the file format itself; since there are no time stamps on each point, Elevation doesn’t have enough data to calculate the speed. If you have the option, use the GPX or TCX file formats instead.

Does View Mode 4 show velocity?
Not at the moment. The blue dots currently trace a simple path across each route at a speed of one GPS point per frame. This doesn’t represent real world velocity in any way, but perhaps a future version will.
How accurate is the scale?
Pretty darn accurate. The maps are projected in Mercator, which is known for distorting the landforms the further away from the equator you get. Elevation compensates for this distortion so the values should be close to reality. However, due to 3D perspective distortion you should only rely on the scale when in 2D mode.

One scenario that might not work so well is if you’re viewing long routes that stretch hundreds of kilometers or more from north to south. The scale is averaged to the middle of those routes, so the top and bottom edges may not be accurate.

Can I change the scale to show miles instead?
No, and this isn’t really a priority; GPS works in metric, I think in metric, so adding the conversion isn’t high on the to-do list.

For now, divide the kilometer value by 1.6 to manually convert to miles if you need to. (ie. 10km = 6.2mi)

Why isn’t the elevation data more accurate?
Elevation is purposely shown at an exaggerated scale compared to latitude and longitude. It turns out that an accurate elevation scale is really boring to look at in most cases. If you really want to see the accurate view, hit Shift + 6 (^). Told you.

Additionally, you may find that that for some of your routes the elevation visualization seems off in places. Maybe by a little, maybe by a lot. This is likely a result of bad data from your GPS device.

Unfortunately commercial GPS isn’t terribly precise, especially when the device doesn’t have a clear line of sight to the satellites. If you’re in the habit of keeping your device in your pocket or tracing routes through heavy forests or dense highrises, you might find the results are wildly inaccurate. To improve the accuracy of your routes consider an armband holder, a bike mount, or some other way of keeping the device outside your clothing.

How do I improve performance?
While Elevation is robust and can handle many thousands of GPS points, there are certainly limits. If you find the display is bogging down and moving to be painfully slow try removing a few XML files from routes you know to be duplicates of others you’ve travelled.

Also if you’re inclined to travel massively large routes, ie. hundreds of kilometers at a time, I salute you. But you may also wish to limit the number of those you try to render at the same time. If your XML files are more than half a meg, don’t throw dozens into Elevation at once.

Are there keyboard shortcuts for movement?
Yes. The arrow keys move the map around. Use - / + to zoom out and back in. Hold down Shift to increase the speed of keyboard movement.

Why is the Windows download so much larger than the Mac OS X download?
Elevation relies on Java. OS X typically has Java pre-installed, whereas Windows doesn’t so the necessary libraries to run it are included. If you’re sure you have Java installed already you can grab this 1.9MB Windows version instead.
What about a Linux binary?
For now Linux is a DIY proposition; go grab the source and a copy of Processing and build your own binary.

If there’s a clamour from Linux enthusiasts I certainly could start creating an “official” Linux version, but I’m not yet convinced it’s worth the time. Feel free to change my mind.


Elevation knows how to work with XML files in the GPX, TCX and KML formats.

Due to inconsistent file structures and limited parsing options in Processing, it may not work with every file in those formats. Support likely depends on the tool used to create them; so far Elevation has been tested with those from the iPhone app RunKeeper Pro, Garmin’s Training Center / Connect and GPSMap, Nokia’s Sports Tracker, and files converted to GPX using GPSBabel.

If you have files in just about any another format, you can probably use GPSBabel to convert them to GPX files and get them working with Elevation. Also, if you’d like to help please send me some example files from your application and I’ll see what I can do about adding native support to Elevation.

Known Issues

Window resizing isn’t overly stable. As in crash-your-whole-system unstable. It will work, until it doesn’t.


The most recent full build of Elevation listed below is always available as the Windows / Mac downloads up at the top. For more frequent minor revisions, follow the Commit history on GitHub.

Version 1.12, December 6 2010
  • Window resizing now supported
  • Keyboard shortcuts for saving output: ‘p’ saves PNG, ‘P” saves vector PDF
  • Keyboard shortcut for reloading data: ‘r’
Version 1.11, October 18 2010
  • GPX and TCX file format support bug fixes
  • Speed data visualization greatly improved
Version 1.1, November 24 2009
Numerous bug fixes and feature updates:

  • Reduced CPU usage while running
  • Added toggle between 2D and 3D modes
  • Added basic animated paths
  • Speed data more accurate
  • Reprojected maps in Mercator, converted internal measurements to meters
  • Added scale indicator
  • Adjusted zoom function to be smoother
Version 1.03, November 1 2009
Fixed bug in OS X version where rotating the map with the mouse would cause the app to freeze. Also reduced elevation points to be a little less exaggerated, and a little closer to reality.
Version 1.02, November 1 2009
Added Garmin/TCX support.
Version 1.01, October 13 2009
Added GPSBabel support.
Version 1.0, October 12 2009
Initial release.


Elevation is © Copyright 2009 – 2010 Dave Shea, and made available under the BSD license.