Categories
iRail Misc Software www

Route Planner updates

These are the things I’ve worked on:

  • changed color to dark blue
  • added a seperate settings page (you can only change the results page language at the moment (the content downloaded from the NMBS website))
  • language settings is saved in a cookie
  • station info is saved in a cookie too, instead of a session
  • changed date and time to use a dropdown menu and the menu should be updated to “now”
  • and many more small changes

Website is accessible through this link: http://b.tuinslak.be

Thanks to Anner for the great feedback.

Categories
iRail Misc Software www

NMBS/SNCB for iPhone

As there is no iPhone compatible website or application, I created my own NMBS “route planner” for the iPhone. This is no app though, this is just an iPhone website.

Basicly, this is what you can do:

  • fill in departure station
  • fill in arrival station
  • fill in time and date (of departure)

At this stage of the project, only the basic train details are shown (departure time, arrival time) and up to 3 or 4 different possibilities (depending what the NMBS website replies).

There is no option (and I’m unsure whether there will be in the future) to see details about a selected trip (like stops and station changes).

The site is made in English, but you can choose in what language you want the results, the only problem I’ve seen so far is that for DE and EN all train station names are in French (Antwerp becomes Anvers), but this “bug” lies out of my hands, as all train information is received from the NMBS websites, including station names.

Basicly this is what it does: it opens a HTTP socket to the NMBS site, filling in your details (like date and stations), and gets the reply back (if the NMBS site replies in time, I’ve seen a few time outs).

All unrequired information is cut off, and you remain with just the trip details. Which should just fit your iPhone in landscape mode.

When filling in your station details, please use existing stations names (language shouldn’t matter), including Central, North, South, etc if needed. Requesting the station “Brussels” won’t work and will just display an empty page for now.

Things I’ll be working on:

  • layout and design of the trip detail page
  • I’ve seen that my Sessions do some weird stuff from time to time (refresh the main page 2x and all sessions are destroyed); but that’s something I’ll have to look in
  • Well, I guess most users want more information, so I’ll have to try to get trip details
  • and better data handling. Still too much unrequired information.
  • Error handling, if e.g. the station doesn’t exist or the date/time is incorrect

Please leave your feedback/bug reports in a comment or per e-mail.

Also, if visiting the website with Firefox, IE or even Chrome… Yes, it’s not compatible to any of them. My website looks dodgy in those browsers; I’ve only focussed on the iPhone browser.

Categories
iRail Misc www

NMBS API?

While trying to find an API or “mobile” (read: iPhone) access for the NMBS website, I came upon some cool stuff.

The time table and train managing software seems made in Germany. The NMBS “look up” site gives you the software and version it is using (“Software versie/dataversie: HAFAS 5.21.B-RAIL.4.7f/5.21.B-RAIL.4.7k – 14/09/08“).

Googling for Hafas returns some cool websites.

Using this one, you can download a pdf with all train (including hours) info between two stations. Not quite the same as an API-key, but at least you have something you can save and use lateron.

This seems to be giving all stops a train will have (or all trains) between two stations. Though the “stoptrains” aren’t in the list, and the IR-train does stop at Mechelen-Nekkerspoel too, which isn’t on the list either. This PDF seems more accurate, and seems to be including all trains.

But still, the DB seem to be ahead of us (well, what country isn’t?). Here is one of the functionalities of HAFAS, which I haven’t seen on the NMBS site yet. Correct me if I’m wrong, but this seems something different. And… Windows-fucking-mobile-only.

Pretty much same problem with Thalys. They even made thalys.mobi, yet, when accessing it with the iPhone (as I lack other PDA-ish devices to test it at the moment) it doesn’t scale/resize/fit my screen, and is displaying the same window I have when browsing it with Firefox.

Wouldn’t it be cool if we had some open (xml?) API, where we could submit departure station, arrival station, and some time, and get a reply with one or multiple results?

I guess I would’ve hoped for more in these “mobile” days.

Edit: my attempt to make something.