Virtual walk

Click the image to restart the walk.

Your browser doesn't support HTML5, which is required for this web page to work properly. Please consider trying again with the latest version of a HTML5 capable browser, such as Firefox, Chrome, Safari or IE9.


If you've looked at the virtual graffiti page you might have noticed that I suggested that the Graffiti Markup Language (GML) might be useful for displaying GPS data. The ability of GML to include an element of time makes for more exciting GPS visualisations than just using a static image.

In fact, it seemed so exciting I thought I'd give it a go! I used a modified version of the Pocket PC tracker program, to collect GPS coordinates at regular intervals, but you should be able to adapt any GPS logs that include a time for each coordinate. I then wrote a convertor in Processing to create a GML file from comma-separated values (CSV) data in the log file. Then, all I needed to do was use the GML file to create some arrays to put in the processing.js sketch, just like on the virtual graffiti page.

The processing.js code used for this page is slightly different to the virtual graffiti page. For one thing, it loads a background image, in this example borrowed from Google Maps. Also, to make it easy to adjust the GPS track to fit properly on the image, there are three variables added: sca (a scale factor), and xoff/yoff which move the track horizontally and vertically. You shouldn't find them too difficult to use with your own data and image. Also, hopefully the other minor changes should be easily understood.

Hopefully you'll find that this page inspires you to do some GPS logging to put on your website. However, if you're artistic why not even create some virtual graffiti outdoors using your GPS. If so, yours could be the biggest virtual graffiti tag ever! Compared to many other options, the great outdoors makes an enormous and beautiful canvas for your creations. By the way, if you're interested the example on this page was a walk around Edgbaston Reservoir, in Birmingham UK, on a nice sunny autumn afternoon.

If you decide to give this project a go, you'll need to use the CSV2GML convertor sketch, which you'll find in the sidebar on this page. It looks for CSV data where each line includes the time in seconds, the longitude, the latitude, and the altitude, in that order. The first line is ignored though, so it can be used for column titles. Any line including an optional PAUSE statement is interpreted as a break in the GML, so you can do dashes like in my example above. Also, the GPS CSV file must end with a line containing END to convert properly.