GPS to HTML Report with Haskell


I’ve combined my new found hobby – cycling; my favourite gizmo – my Android phone; and my favourite programming language – Haskell, to implement the project: Gps2HtmlReport.

The program takes exported GPS tracks (gpx files), and generates a HTML report providing information such as:

  • Journey distance & time, and when the journey took place
  • Two diagrams charting elevation, accumulated distance and average speed over time
  • An OpenStreetMap diagram illustrating the journey

Here’s an example HTML report, generated by the program:

I have released the source code on GitHub, should you want to use program (please do!).

I would greatly appreciate feedback, and bug reports if you find them. To use the program, all you need is:

  • A GPS tracking device. Most Smart Phone markets will have Apps to do the job. I certainly recommend the open source  OSMTracker App. It appears to play nicely with this Haskell program.
  • The Glasgow Haskell Compiler platform
  • A few additional system packages, `GraphicsMagick’ and `cairo’

For Fedora at least, you simply need to run:

$# yum install GraphicsMagick cairo

Have fun tracking !!


  1. Eric Mesa Said,

    That’s really, really awesome, dude!

    I have a Garmin HCx that I use to add gps coordinates to my photos, but I’ve taken it out on bike rides. I’m going to try and run this on one of those tracks and I’ll give you feedback if anything doesn’t work.

    Stuff like this is why I love FLOSS. First of all, it provides compilers gratis. Second, it encourages people who create great software like this to share it with others.


  2. Rob Said,

    @Eric Great, really pleased that you might be able to use it! Please let me know how you get on, regardless of whether you have any issues with it. Suggestions also welcome..


  3. Eric Mesa Said,

    Maybe this is just assumed for Haskell developer types, but you forgot the mention that I need to use cabal install for cairo, gps, etc. In other words, just doing the yum install doesn’t appear to be enough. I was getting the error:

    cabal configure
    Resolving dependencies…
    Configuring gps2htmlReport-0.1…
    cabal: At least the following dependencies are missing:
    Chart -any,
    cairo -any,
    colour -any,
    data-accessor -any,
    gd -any,
    gps -any,
    xsd -any

  4. Eric Mesa Said,

    OK, finally got everything installed. When I run it, sadly I get “unable to parse GPX file”

  5. Eric Mesa Said,

    Sent you the gpx file

Add A Comment

By Rob