FractalNet
Home Software Music Other
Overview   Overview
Guitar Chord Explorer   GCE
Guitar Chord Explorer - Home       Home
Guitar Chord Explorer - Instructions       Instructions
Guitar Chord Explorer - User comments       User comments
FractalNet   FractalNet
Particle System Designer   PSD (Second Life)
Marble Challenge   Marble Challenge
ASCIIroids   ASCIIroids
Gravity Bubbles   Gravity Bubbles
EcoSim   EcoSim
Cosmic Dust   Cosmic Dust
LandMesh   LandMesh
Imagencrypter   Imagencrypter
TrainMapper   TrainMapper
Foxy Detector   Foxy Detector
MacDiff   MacDiff
Asteroid Belt   Asteroid Belt
Matrix Attack   Matrix Attack
Solar Swarm   Solar Swarm
Tools   Tools
Names :-)   Names :-)
TrainMapper

TrainMapper

Sorry, TrainMapper
is not yet available
for public download.
TrainMapper is an application which displays the current positions of various UK trains on a map.

The application uses live train status information which is publicly available on the internet.  For each train, it analyses the latest departure and arrival data, and then calculates the approximate geographical position, which is then plotted on the map.  If a train is reported to be delayed or cancelled, the map is updated accordingly.

I’ve made two different versions of TrainMapper.  Version 1 (completed in January 2009) is a web application, while version 2 (completed in February 2009) is a Java application.

I was inspired to create TrainMapper after seeing Matthew Somerville’s “Vaguely live map of trains in the United Kingdom”.


Version 1 

This is a time-lapse video of TrainMapper v1, recorded on Wednesday 14th January 2009.  A 24-hour clock is displayed in the top-left corner, and the video runs about 242 times faster than real-time.

I highly recommend you watch this video in fullscreen mode, to enable you to read the station names on the map.

YouTube fullscreen button Click on this button in
the YouTube player to
watch the video fullscreen.
Watch this video on YouTube  →
Watch this video on Vimeo  →

I wrote TrainMapper v1 in about 470 lines of JavaScript and 350 lines of PHP, and it uses XHR/AJAX to automatically obtain the latest train data from the webserver every few seconds.

The map shows two train lines in the south-west of London, running between Guildford and London Waterloo.  Only trains which stop at Esher (on the South Western Main Line) and Hinchley Wood (on the New Guildford Line) are displayed.

When a train is reported to be delayed, you’ll see it “jump” forwards or backwards as its position is recalculated.

Unfortunately, no live train status information is available after midnight, so all the trains disappear from TrainMapper at that time (even though trains are still running until about 2am).

The video was created using an AppleScript which took periodic PNG screenshots of TrainMapper running in Safari (click here for the actual script used).  These screenshots were then converted into a movie using the following MEncoder command:

mencoder "mf://*.png" -mf fps=25 -o trainmapper.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000:mbd=2 -vf crop=1280:720:0:45 -oac mp3lame -lameopts cbr:br=128:aq=2:mode=1 -audiofile music.wav


Version 2 

This is a time-lapse video of TrainMapper v2, recorded on Thursday 19th February 2009.  A 24-hour clock is displayed in the top-left corner, and the video runs about 125 times faster than real-time.

I highly recommend you watch this video in fullscreen mode, to enable you to read the station names on the map.

YouTube fullscreen button Click on this button in
the YouTube player to
watch the video fullscreen.
Watch this video on YouTube  →
Watch this video on Vimeo  →

I wrote TrainMapper v2 in about 3,000 lines of Java.  It contains a database of all 189 stations which can be reached by direct trains from London Waterloo, and it displays all trains which arrive at and depart from Waterloo.  In the time-lapse video above, a total of 756 trains arrive, and 758 trains depart.

Map of the South West Trains lines from London Waterloo

This is the map of the South West Trains lines from London Waterloo, used by TrainMapper v2.

Click to view the full-size version.
The map shows the following train lines in the south-west of London: Only 99 of the stations on these lines are visible on the map (the other 91 are off the edges of the map).

Version 2 contains several improvements compared to version 1, including:
  • 15 train lines are now displayed, instead of just 2.
     
  • The train lines are now colour-coded.
     
  • Trains now travel from one station to the next using a sinusoidal movement, instead of moving at constant speed.  This makes the trains’ movements more realistic.
     
  • Trains no longer disappear from the map at midnight.  Although no live train status information is available after midnight, TrainMapper stores the information it obtained before midnight, and uses this to continue displaying trains.

Comments Automatic country lookup for comments powered by MaxMind GeoLite Country

Alex Anderson
    25 Apr 2009
    United Kingdom
if you make an iPhone version of it that would be epic!!
Siegbert
    14 Oct 2012
    France
Eimai poly perifanh pou exw teutoois filous se authn thn polh Tha pernaw na to tsekarw syxna Den symmeteixa dystyxws auth th fora .Opote to mono pou mporw na kanw einai to abafter creation servicebb. Se ka8e periptwsh EYXARISTOUME OLOUS SAS!
ckdnjynju
    15 Oct 2012
    France
WTm65P , [url=http://xezhnrujnvxc.com/]xezhnrujnvxc[/url], [link=http://uwqnqrxemggf.com/]uwqnqrxemggf[/link], http://onatuutzglwo.com/
udsykkk
    19 Oct 2012
    United States
M9CWzD , [url=http://zoesnjsxoych.com/]zoesnjsxoych[/url], [link=http://heiltlejvnxo.com/]heiltlejvnxo[/link], http://eireklsmhmgb.com/


Add a comment 

Name (optional)
Copy the security code above
into the box below:



The security code is a CAPTCHA to prevent automated software from posting large amounts of spam comments (I get about 22 spam comments for every 1 genuine comment).
Comment
No HTML or BBCode please
Contact me  –  Page last updated on 7th February 2010  –  Website hosted by 5quidhost (highly recommended!)
Michael Hogg