Note this is a rough estimate for the bounding box, so it may have missed some parts, and it includes part of the Republic of Ireland as well.
This will get you the data in OSM XML format. If you want a list you could use probably GPSBabel to convert to CSV format.
Also note some stations and airports may be mapped as areas instead of (or as well as) nodes.
I have managed to get the data into csv file so I should be able to create some database tables from it now.
The only small question I have is that the description of each item in the file is “osm-id XXXXXXXX”. Is there somekind of lookup table I need to convert these to real names?
Using CSV format, try and enable the “prefer_shortnames” option.
If you’re using the GPSBabel GUI, you can click on the icon for options for the output format, and tick the box for “use shortname instead of description”. Or from the command line, use something like -o csv,prefer_shortnames=1 -F “test.csv”
Then I think it should output the names instead of the osm-id.
I’ve got exactly the same problem - I need a list of UK railway stations with lat/long.
I’ve only signed up today so maybe I’m doing something silly, but I tried putting the xapi request into my browser and the browser couldn’t connect.
Can anybody tell me what I’m doing wrong?
The xapi.openstreetmap.org server has been down for a while.
There are a few alternative XAPI servers, see the list here: http://wiki.openstreetmap.org/wiki/Xapi
Though I’m not sure which ones are working just now. I think open.mapquestapi.com is working. Though note it is limited to 10 square degrees, so you can’t get the whole of the UK at once.
I’m surprised that it’s so difficult to get such a basic set of data.
I’ve decided that my best bet for a reasonably accurate list is to use the Wikipedia data at http://en.wikipedia.org/wiki/UK_railway_stations_%E2%80%93_A and following. This has postcodes for each station and I can use the postcode/location data on the O/S Open Data site to add a lat/long.