Posted on October 24, 2008 by rodney
Tags: cycling, tour

Well, now I know all about geographic datums and projections, and what’s the difference between WGS84, EPSG:4326, EPSG:900913. The answer is that WGS 84 is a datum, EPSG:4326 is a projection which refers to WGS 84, no hang on that’s not right, it’s a datum, the same one WGS 84. Actually I’m not so sure about that. Anyway, EPSG:900913 is the new name for a spherical mercator projection. Or is it a datum, I’m not sure? The important thing is that it approximates the Earth as a sphere instead of an ellipsoid, and this makes some geographers really angry.

EPSG:900913 is better known as the google projection and has the property that the world (most of it) becomes a square. The square can be divided into 4 smaller squares, and so on, and this is how the tiling works in google maps.

Unfortunately the projection suffers distortion which makes Alaska look bigger than Western Australia ((Wikipedia: W.A. 2,645,615 km², Alaska 1,717,854 km²)), and for technical reasons Father Christmas’ house must be left off the map – this is really what makes the geographers angry.

So you won’t find many free GIS (Geographic Information Systems) software packages that project into EPSG:900913, and up until recently, unless you had a PhD, you couldn’t layer your own data on top of a google map without using their javascript API. Javascript is crap for drawing 90 days’ worth of GPS tracks across Europe, so I needed something else.

Luckily, I found MapServer and TileCache, and some good instructions on how to configure MapServer to render into the google projection.

So after far too much time spent fiddling around with different bits of softare, and lots of cut&paste javascript programming (the best way to write javascript), the end result is this:

(Each colour is a different day, the dots are where I took photos. The gaps are because of GPS problems. Train trips are from Venice to Vienna, and from Zakopane to Wrocław)

Behind the coloured lines are my dodgy collection of scripts which take NMEA data from the GPS, correlate them with photos and my written notes, and arrange them ready for MapServer. Languages in use are Python, Perl, awk, sed, m4, and a big nasty Makefile which ties them all together.

Anyway, that’s enough fiddling and reminiscing about bike tour for now. I hope you enjoy the map, bye!