Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
List of European train stations and associated metadata (github.com/capitainetrain)
107 points by thibaut_barrere on April 23, 2015 | hide | past | favorite | 55 comments


In this context absolutely worth mentioning is the Public Transport Enabler (https://github.com/schildbach/public-transport-enabler). This is what we used to create this prototype: https://medium.com/@highsource/reliable-train-connections-ap...

Disclaimer: I'm working for the Deutsche Bahn (German Railways) and try do some persuasion work towards Open Data here internally.


May I ask why the sessions expire so quickly on the DB website? That can be quite annoying—to say the least, for example when one wants to go back in the browser history or check on the status of a certain connection in case of strikes or severe weather.


I'm not on that very project, but my guess would be that sessions are not completely stateles on the server side so they have to have session timeouts to drop obsolete sessions. I'll ask when I meet someone from that project.


That would be great. I'm genuinely interested, also why they manage sessions in the first place.


I'd love to get GPS tracks for the german railway system, been looking for something like that forever. Good luck with and thanks for your efforts!


Its not in OpenStreetMap already!?!


Could you explain why a railway operator might not want their data to be opened? After all, better availability of data might convince more people to use trains.


This is a difficult matter. I'm actually on the Open Data side (not the "dark force"), but let me play the devil's advocate here.

* What if the data will be used to convince people to use less trains? Busses and car sharing are now a huge competition. What if someone would take the data and represent it in a way very unfavourable for the long-distance trains? There are multiple ways to "tweak" the statistics without actually lying. * DB is not a single entity but rather a complex network of smaller companies and departments within them. At the moment there's no Open Data directive from the top so they basically have to decide on their own. This has at least a few problems for department heads: * responsibility - you can easily get your head off for a wrong data sharing decision; * losing data as the asset - departments often use data they have as a leverage when negotiating with other departments and companies, it's a valuable assed; * data ownage question - you normally don't have "pure" data, you have data coming from somewhere else which you enhance/process, so before sharing that you have to clear if you actually have the rights to. Having a few dozen "historically grown" data sources, this may be very difficult; * have to pay to prepare the data for sharing. Like, convert gigabyte-sized Acces "databases" into something more usable, specifying interfaces and so on. This is a huge effort, and who pays for that? * Next, there are a few political problems like "non-discrimination" EU directives. Every public stunt for DB Netz, for instance, may lead to a "discrimination" suite from some operator. So there's a risk of legal problems. * DB gets a few billions a year from the state to maintain and improve the infrastructure (look up LuFV). What if some clever reporter will use the data and prove that DB could have invested and maintained better? And you're getting a few millions fine from the state/EBA?

The list goes on. For decision makers the risks and dangers are obvious but the benefits are not, or at least not yet. So I'm very glad about the rising "hackathon" movement here as it is a good way to show that there may be real and direct benefits. This may really help to persuade people.


Thank you, very interesting perspective.

Increasingly that data can be obtained using collections of interacting phones in a community-driven way using travelling data from Bahn users, a la Open Street Map. The spectre of this happening might nudge transport companies towards embracing a more open approach.


Traditionally access to the data has been sold; making it public loses that income.


Systel? Been at the Hackathon recently? :)


Won it. :)


Just read the posting and have to say, I really would dig the Chrome extension - and having a lot of traveling colleagues here in Hamburg, they would too.

Also the app - this would really be a great app to have.

Kudos!


Thank you for the feedback. The Chrome extension is meaningless without the service providing the data. And the data isn't set free, unfortunately.

We're talking to DB Vertrieb about this app next week.


Ah, A.V., w/ Falco from our group in Ulm? The world is small ;)


transport-enabler is also used by the Android app Öffi or Oeffi :-)


Adding national identifiers could be useful. "SMG" is St Margarets in London, "SMT" is St Margarets in Hertfordshire, and commuters using either probably know the code — it's exposed on official websites.

Here are the national three-letter codes for stations in Great Britain, available in CSV format: http://www.nationalrail.co.uk/stations_destinations/48541.as...


There is a field called sncf_id that includes SNCF-specific codes (and similar ones for other carriers); there could be a nationalrail_id field as well. Great suggestion! You totally should create an issue on GitHub.

(Disclaimer, here I speak for myself but work at Capitaine Train.)


"National IDs" for the Germain stations would be so-called RL100: http://fahrweg.dbnetze.com/file/fahrweg-de/2394144/vHBDX5Ond...


Wow! I didn’t know about those ids, thank you. However it would be some work to match the stations. What call the db_id is called IBNR as Internationaler Bahnhofs Nummer


Few weeks ago failed to find public IBNR/RL100 mappings. So we ended up typing 200 main stations per hand (basis was Wikipedia).

DB has the data in systems (for instance, ETN), it's just, well, not open...


Welcome to my world ;)


If you feel like exchanging information on this veeeeery specialized topic, check the open-transport mailing list run by OKFN: https://lists.okfn.org/pipermail/open-transport/


I am on that list since a while :) We met at the Okfn-conf in Geneva.

I am waiting until we translate the blogpost and our page in English before talking about that on the list. Pieter Colpaert alreday complained about uri/linked data ;)


Sorry, Tristram, I didn't mean to address this hint to you – I know you're on there already :D This was meant more as a general hint to anybody interested.


Great, I wish I had that when I did this visualisation: http://ssz.fr/territoire/

Instead, I had to do hack upon hack to match SNCF's station names (like say "Valence (France - toutes gares)") to OSM nodes, or failing that to city names, and in the end fix the remaining ones manually.


Very nice representation! I hope that this data will allow more innovative representations to exist!



[deleted]


I'm not working at CapitaineTrain - but user @tristramg who replied below apparently does. You should get both in touch!


Thanks, moved the comment there. :)


This is really nice, though the documentation is a bit lacking in parts (there's already a pull request to make things a bit nicer :)

For example, I can see a station is missing, but is there any way to find its UIC code (or other identifiers) so I can add an entry? It's not clear what `is_suggestable` actually means, so I wouldn't know what to input.

Also, while there are info:* columns for miscellaneous info, there doesn't seem to be multiple name:* columns for the localised station name (a lot of this data may already be in OpenStreetMap)?


Thank you.

Indeed the data is incomplete yet. Bear in mind that the data comes from a specific use on https://www.capitainetrain.com That is why many countries are poorly covered (yet! we plan to eventually cover whole Europe).

There is no magic to find the UIC code, sorry… Sometimes it is in OpenStreetMap, sometimes we get it from a rail operator… But it is not a required value, so you can add it with out the station.

`is_suggestable` means that the user can input the station on capitainetrain.com. Leave it false for now ;)

The idea behind the name vs. info is that name is the station as it is locally known. Info adds any information extra information to help to find which station it is (that includes translations, “Central Station” for people not understanding „Hbf“, disambiguation between similar names…)


> Info adds any information extra information to help to find which station it is [translations, disambiguation]

These are two separate use cases, which should have their own structured fields. The current uses of info:* seem to be very free-form at the moment.

If I want to travel to Cologne Trade Fair, I should be able to start typing "colo" and find it, without knowing that it's called "Köln Messe" in German. Whereas the info:* fields should separately have useful info, e.g. "Trains transfer from Cologne Main Station every few minutes."

Much like on OpenStreetMap, doing a name search should match against all name:* fields. Info fields should be for info.


Some station names are incorrect. For example, the file lists a UK station named "Yeovil", while there is no such station -- it should probably be "Yeovil Junction".


Submit a PR :)


It's quite incomplete in (at least) Austria.

While some stations in the bigger cities and in Vienna are included, I could not find any stations in lower austria.

They are all listed in OpenStreetMap, and the inofficial ÖBB API (kinda documented here: https://github.com/internetztube/oebb-api) could be used to get the correct names. :)


Indeed.

For now Capitaine Train the only carriers we are connected to that stop in Austrian stations are Deutsche Bahn and Trenitalia. Only those stations are in the database. Once we connect to ÖBB and Westbahn, we will need a more important cover.

Until then, we are open for pull requests ;)


I might actually give it a try. Hope they don't rate limit much :)


Around Barcelona there are also many missing stations.


Nice project idea: collect gps data from cell-phone users that are on a train, and based on this data (lots of users moving at the same speed across known tracks), get an overview of where trains are located.


There's an API for that...

Here's a list of uses of British open train data: http://nrodwiki.rockshore.net/index.php/Projects (a few are broken).

For example, a live diagram of the signals on the line from London Victoria to East Croydon http://www.opentraintimes.com/maps/signalling/vtb1


There may be no need soon - most EU countries have very accurate data that theyve traditionally kept to themselves, but are now being mandated to make available. Its very slow, but getting there:

http://www.era.europa.eu/Core-Activities/Interoperability/Pa... http://tap-tsi.uic.org/


Not using GPS data (which I believe is a flawed idea, too much battery used for the community) but using the API given by the providers, raildar (http://raildar.fr/#lat=46.810&lng=6.880&zoom=6) is already displaying trains in real time with their delay.


Here's our "train radar":

http://www.apps-bahn.de/bin/livemap/query-livemap.exe/dn?L=v...

Disclaimer: this is NOT realtime GNSS data. New project coming in that direction soon.


That's neat. The train from Trier to Homburg just passed by so I checked its accuracy, and it was showing it one kilometre ahead of the actual train position, then the indicator moved backwards to match the actual location. I guess this is because of the interpolation you do as it's not real time data yet. I'm a great fan of your (DB's) work and use your apps/website daily. Keep up the good work!


Thank you. :)

Yes, they do a lot of interpolation there, see the description: http://www.bahn.de/hilfe/view/pk/de/zugradar.shtml

There are a few of ongoing projects which will display the precise real data delivered by trains in near-real-time. But I'm not quite sure, which will be public.


You'd have to convince the users to allow you to track their position though. It's easier to install a GPS module (or similar) onto a train, and publish it in a public API.


Most trains already have GNSS capabilities, we (DB) get quite exact positions every 30 seconds (going down to 10 soon).


It's a good start, but a lot of countries are missing from the list.


(I work at Capitaine Train who published this data)

It is true. This database has not the pretension to have all the stations in Europe. It has all the stations where we can sell tickets to. As we connect to more carriers, the database will expand. But it is a long process.


There is list of Czech stations on wiki, I think you could find other countries too.

https://cs.wikipedia.org/wiki/Seznam_%C5%BEelezni%C4%8Dn%C3%...


See https://news.ycombinator.com/item?id=9426153 - apparently trying to get in touch with CapitaineTrain. Hope this helps.


> It has all the stations where we can sell tickets to.

This list seems to have a lot more stations than the website or Android app allows.

e.g. I can't book a ticket to/from London Charing Cross, or Cambridge, yet those are in the CSV file.


I'd be glad if you drop me a message so that we could establish a contact. xing.to/va or valikov-at-gmx.net (Disclaimer: working for the Deutsche Bahn.)


Bien joué ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: