[iRail] API Issue with Rhode Saint genese in connection & Liveboard
Pieter Colpaert
pieter.colpaert at gmail.com
Sun Aug 14 18:52:40 UTC 2011
@Tim Esselens:
Same problem will occur: you also send the station-name to the NMBS/SNCB
servers first for connections and it will return the wrong value for
"Brussels South".
@Christophe:
On Sun, 2011-08-14 at 20:03 +0200, Christophe Versieux wrote:
> Pieter,
Addressed to me directly but thrown on the mailinglist. Is this a new
way that we're going to communicate with each other? I can pick up my
phone you know ;)
>
> This is something really strange from the API.
> Imagine a foreign (chinese, american, african, etc..) user of any
> application.
> He will of course use iRail or BeTrains because belgian people told
> him that NMBS sucks at information.
>
> The facts are
>
> * The application should provide a list where he can pick the
> station name with both dutch & french versions (Rhode saint genese and
> sint genesius rhode is quite easy, but something like Doornik/Tournai
> is not intuitive when you are on the plateform, because that's kinda
> impossible to translate.)
Possible workaround: if the Levenshtein distance is too large then show
both of them?
My idea of the stationslist has always been that you can download a
stationslist for your own use in your application and then you alter it
to your own taste. The most important part are the ID's because they
give you certainty that you have selected that station. If you don't
provide an id, we will do a wild guess by sending the name to the
servers of the NMBS/SNCB and they will return their number 1 preferred
station.
I agree that the stationlist sucks. If you or another BeTrains dev gives
me a list of all stations with their right name, railtime ID and correct
geolocation I'm going to implement that list in the database right away.
> * The API request will use lang=en because I want neutral names to
> be returned (Bussels-South)
>
> -> Seem currently impossible, and bad results will be returned....
Indeed. English names are hardly supported by the NMBS/SNCB server and
therefore I did not put a lot of work in fixing all stationnames in
English. Feel free to do so though!
> I can live with that and hardcode stations numbers, but maybe that
> feature request should be written in the TODO list.
Sure! Feel free to create a TO DO list on project.iRail.be and put it on
there. I may find the time in September to fix this myself, if not yet
fixed by someone else.
>
>
> >
> > Pieter Colpaert
> > 11 août 2011 12:05
> >
> > Hi Christophe,
> >
> > I'm sorry to notice that it's not easy to fix this. Since you are
> > not
> > adding a language parameter, we have to guess the language inside
> > the
> > API. We do this by sending the name to the NMBS and by asking what
> > they
> > think of it. They try to return the best option as possible.
> >
> > If you try this: http://api.irail.be/liveboard/?station=sint%
> > 20genesius%
> > 20rode&lang=nl
> >
> > or http://api.irail.be/liveboard/?station=saint%20rhode%
> > 20genese&lang=fr
> >
> > It works like a charm.
> >
> > If you want you can add a hardfix to the API by changing it in the
> > php-code but I think it's better to always add a language parameter?
> >
> > Yours sincerely,
> >
> > Pieter
> >
> >
> >
> >
> > ____________________________________________________________________
> >
> >
> >
> > Christophe Versieux
> > 11 août 2011 11:27
> >
> > Hello,
> >
> > I already reported an issue with Rhode saint genese liveboard:
> > http://api.irail.be/liveboard/?station=rhode%20saint%20genese
> > That returns results from "De Hoek"
> >
> > Seem that the connection is also broken for this city!
> >
> > http://api.irail.be/connections/?to=rhode%20saint%
> > 20genese&from=tournai
> > <error code="502">
> > Could not get data. Please report this problem to
> > iRail at list.iRail.be.
> > </error>
> >
> >
> > ____________________________________________________________________
>
> _______________________________________________
> iRail mailing list
> iRail at list.irail.be
> http://lists.rootspirit.com/mailman/listinfo/irail
--
iRail vzw/asbl
+32 (0) 486/747122
More information about the iRail
mailing list