Last active
October 7, 2024 18:50
-
-
Save apis/030bba6958a054a7dbf0 to your computer and use it in GitHub Desktop.
Wikipedia IATA railway stations list scrapper, including coordinates. Written on Ruby. Resulting CSV is included.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wikipedia IATA railway stations list scrapper, including coordinates | |
# revision from: 2015-10-20 | |
require 'net/https' | |
require 'uri' | |
require 'nokogiri' | |
require 'csv' | |
BASE_URL = 'https://en.wikipedia.org' | |
BASE_PATH = '/wiki/List_of_IATA-indexed_railway_stations' | |
DISAMBIGUATION_HASH = { '/wiki/Heathrow_station_(disambiguation)' => '/wiki/Heathrow_Central_railway_station' } | |
IATAS_WITH_DEAD_LINKS = ['XEW', 'XYM', 'YJH', 'YJV', 'ZMI'] | |
def get_html(url) | |
sleep(1.0) | |
uri = URI.parse(url) | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
request = Net::HTTP::Get.new(uri.request_uri) | |
response = http.request(request) | |
raise 'HTTP request failed!' unless response.code == '200' | |
response.body | |
end | |
def get_coordinates(path) | |
html = get_html(BASE_URL + path) | |
document = Nokogiri::HTML(html) | |
coordinates = document.at_css('span#coordinates span.geo-dms') | |
if coordinates.nil? | |
coordinates = document.at_css('table.infobox.vcard span.geo-dms') | |
end | |
latitude = coordinates.at_css('span.latitude').text | |
longitude = coordinates.at_css('span.longitude').text | |
return latitude, longitude | |
end | |
def convert_coordinate(dms_coordinate) | |
match = dms_coordinate.match(/(\d+(\.\d+)?)°(\d+(\.\d+)?)′((\d+(\.\d+)?)″)?(N|E|S|W)/) | |
coordinate = match[1].to_f + match[3].to_f / 60 + (match[6].nil? ? 0.0 : (match[6].to_f / 3600)) | |
coordinate *= -1 if 'SW'.include? match[8] | |
coordinate | |
end | |
def disambiguate_path(path) | |
new_path = DISAMBIGUATION_HASH[path] | |
return new_path.nil? ? path : new_path | |
end | |
def get_railway_iatas() | |
html = get_html(BASE_URL + BASE_PATH) | |
document = Nokogiri::HTML(html) | |
railway_station_codes = document.at('//h2/span[@id="Railway_station_codes"]/..') | |
siblings = railway_station_codes.xpath('following-sibling::*') | |
CSV.open('railway_iatas.csv', 'wb') do |csv| | |
row = [] | |
row << 'IATA' | |
row << 'Name' | |
row << 'DMS latitude' | |
row << 'DMS longitude' | |
row << 'Latitude' | |
row << 'Longitude' | |
csv << row | |
# index = 0 | |
siblings.each do |sibling| | |
break if sibling.name == 'h2' | |
next if sibling.name != 'ul' | |
items = sibling.xpath('li') | |
items.each do |item| | |
# index += 1 | |
# next if index < 130 | |
text = item.text | |
substring_index = text.index(':') | |
description = text[(substring_index + 1)..-1].strip | |
iata = text[0..(substring_index - 1)].strip | |
link_element = item.at('a') | |
if link_element.nil? | |
latitude = '0°0′0″N' | |
longitude = '0°0′0″E' | |
else | |
path = link_element.at('@href') | |
if path.nil? or IATAS_WITH_DEAD_LINKS.include? iata | |
latitude = '0°0′0″N' | |
longitude = '0°0′0″E' | |
else | |
latitude, longitude = get_coordinates(disambiguate_path(path.to_s)) | |
end | |
end | |
row = [] | |
row << iata | |
row << description | |
row << latitude | |
row << longitude | |
row << convert_coordinate(latitude) | |
row << convert_coordinate(longitude) | |
csv << row | |
end | |
end | |
end | |
end | |
get_railway_iatas() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IATA | Name | DMS latitude | DMS longitude | Latitude | Longitude | |
---|---|---|---|---|---|---|
ADB | Adnan Menderes Airport Rail Station, İzmir, Turkey | 38°17′33″N | 27°08′51″E | 38.2925 | 27.1475 | |
AMS | Schiphol railway station on the Weesp-Leiden line near Amsterdam, Netherlands. High speed trains (Thalys) to Brussels and Paris using HSL-Zuid stop here as well. | 52°18′32″N | 4°45′42″E | 52.30888888888889 | 4.761666666666667 | |
ARN | Stockholm-Arlanda Airport railway station, Sweden (walking distance from the airport) | 59°39′07″N | 017°55′07″E | 59.651944444444446 | 17.91861111111111 | |
BHX | Birmingham International railway station, United Kingdom (600 m or 2,000 ft by rail from the airport) | 52°27′04″N | 1°43′30″W | 52.45111111111111 | -1.725 | |
BNJ | Bonn Hauptbahnhof, Sankt Augustin, Germany (at Bonn-Hangelar Airport (ICAO: EDKB)) | 50°43′55″N | 7°5′49″E | 50.731944444444444 | 7.0969444444444445 | |
BOO | Bodø Station, Norway (5 km from airport) | 67°17′11.000″N | 14°23′29.130″E | 67.2863888888889 | 14.391425 | |
BRS | Bristol, United Kingdom (13 km or 8.1 mi from airport) | 51°26′56″N | 2°34′48″W | 51.44888888888889 | -2.5799999999999996 | |
BRU | Brussels National Airport railway station, Belgium | 50°53′50″N | 4°29′05″E | 50.89722222222222 | 4.4847222222222225 | |
CBG | Cambridge railway station, United Kingdom | 52°11′38″N | 0°08′17″E | 52.193888888888885 | 0.13805555555555554 | |
CDG | Aéroport Charles de Gaulle 2 – TGV, Roissy, Paris, France (LGV Interconnexion Est (high-speed line) with TGV/Thalys services) | 49°00′14″N | 2°34′16″E | 49.00388888888889 | 2.5711111111111107 | |
CGN | Bahnhof Köln/Bonn Flughafen, Germany (walking distance from the airport). The ICE trains stop here as well. | 50°52′44″N | 7°7′10″E | 50.87888888888889 | 7.1194444444444445 | |
CPH | Copenhagen Airport, Kastrup Station, Denmark (underneath airport T3) | 55°37′47″N | 12°38′57″E | 55.62972222222222 | 12.649166666666666 | |
DUS | Düsseldorf Flughafen Fernbahnhof, Germany on the Cologne–Duisburg Railway line (SkyTrain people mover). | 51°17′30″N | 6°47′11″E | 51.291666666666664 | 6.786388888888888 | |
DYN | Danyang Railway Station, China on the Shanghai–Nanjing Intercity Railway line. | 32°0′12″N | 119°35′15″E | 32.00333333333333 | 119.58749999999999 | |
EEP | Pamplona Railway Station, Pamplona, Spain | 42°49′N | 1°39′W | 42.81666666666667 | -1.65 | |
EWR | Newark Liberty International Airport (NJT station), New Jersey, USA (8 km or 5.0 mi from the airport via monorail) | 40°42′16″N | 74°11′27″W | 40.70444444444445 | -74.19083333333333 | |
FRA | Frankfurt (Main) Flughafen Fernbahnhof in Frankfurt am Main, Germany on the Cologne-Frankfurt high-speed rail line (walking distance from the airport) | 50°03′10″N | 8°34′12″E | 50.05277777777778 | 8.57 | |
FVS | Finland Station in Saint Petersburg, Russia | 59°57′20″N | 30°21′24″E | 59.955555555555556 | 30.35666666666667 | |
GVA | Gare de Cornavin (underneath Geneva airport) | 46°12′37″N | 6°08′33″E | 46.21027777777778 | 6.1425 | |
HEC | Helsinki Central railway station, Helsinki, Finland | 60°10′19″N | 24°56′29″E | 60.17194444444444 | 24.941388888888888 | |
HVT | Tikkurila railway station, Helsinki, Finland | 60°17′38″N | 25°2′42″E | 60.29388888888889 | 25.045 | |
JKG | Jönköping railway station, Sweden (11 km from the airport) | 57°46′58″N | 14°09′38″E | 57.782777777777774 | 14.160555555555556 | |
KLR | Kalmar railway station, Sweden (6 km from the airport) | 56°39′41″N | 16°21′46″E | 56.66138888888889 | 16.36277777777778 | |
KSD | Karlstad railway station, Sweden (17 km from the airport) | 59°22′42″N | 13°30′15″E | 59.37833333333333 | 13.504166666666666 | |
KVN | Kunshan South Railway Station, Kunshan City, Jiangsu, China | 31°21′18″N | 120°56′47″E | 31.355 | 120.94638888888889 | |
LEJ | Leipzig/Halle Airport railway station, Germany (walking distance from the airport) | 51°25′24″N | 12°13′21″E | 51.42333333333333 | 12.2225 | |
LHR | London Heathrow stations: Central, T1,2,3, T4 tube, T4 rail, T5 (all inside London Heathrow Airport perimeter). | 51°28′16″N | 0°27′14″W | 51.471111111111114 | -0.4538888888888889 | |
LPI | Linköping railway station, Sweden (3 km from the airport) | 58°24′57″N | 15°37′31″E | 58.41583333333333 | 15.625277777777779 | |
LPL | Liverpool Lime Street railway station[citation needed] | 53°24′27″N | 2°58′42″W | 53.4075 | -2.9783333333333335 | |
LYS | Gare de Lyon Saint-Exupéry, Lyon, France | 45°43′16″N | 5°4′34″E | 45.721111111111114 | 5.076111111111111 | |
MAN | Manchester Airport railway station | 53°21′54″N | 2°16′23″W | 53.365 | -2.2730555555555556 | |
MHG | Mannheim Hauptbahnhof, Mannheim, Germany | 49°28′47″N | 8°28′11″E | 49.47972222222222 | 8.469722222222222 | |
NCL | Newcastle railway station, United Kingdom | 54°58′07″N | 1°37′02″W | 54.968611111111116 | -1.6172222222222223 | |
NKJ | Nanjing South Railway Station, Nanjing, Jiangsu, China | 31°58′14″N | 118°47′33″E | 31.970555555555553 | 118.7925 | |
OSD | Östersund railway station, Sweden (9 km from the airport) | 63°10′45″N | 14°38′09″E | 63.17916666666667 | 14.635833333333332 | |
OSL | Oslo Airport Station, Norway (walking distance from the airport) | 60°11′38″N | 11°06′02″E | 60.193888888888885 | 11.100555555555555 | |
PIK | Prestwick Airport railway station, Scotland, United Kingdom | 55°30′32″N | 4°36′51″W | 55.50888888888889 | -4.614166666666667 | |
QDH | Ashford International, Ashford, Kent, UK | 51°08′37″N | 0°52′28″E | 51.14361111111111 | 0.8744444444444445 | |
QDU | Düsseldorf Hauptbahnhof, Düsseldorf, Germany | 51°13′13″N | 6°47′34″E | 51.22027777777778 | 6.792777777777777 | |
QFB | Freiburg Hauptbahnhof, Freiburg Germany | 47°59′52″N | 7°50′31″E | 47.99777777777778 | 7.841944444444444 | |
QFV | Bergen railway station, Norway | 60°23′25″N | 5°19′59″E | 60.390277777777776 | 5.333055555555555 | |
QJZ | Gare de Nantes, France | 47°13′0″N | 1°32′30″W | 47.21666666666667 | -1.5416666666666665 | |
QKL | Köln Hauptbahnhof, Cologne, Germany | 50°56′33″N | 6°57′29″E | 50.942499999999995 | 6.958055555555556 | |
QLJ | Lucerne railway station, Lucerne, Switzerland | 47°2′56″N | 8°18′38″E | 47.04888888888889 | 8.310555555555556 | |
QLS | Lausanne, Switzerland | 46°31.19′N | 6°38.01′E | 46.51983333333333 | 6.6335 | |
QPP | Berlin Hauptbahnhof, Berlin, Germany | 52°31′30″N | 13°22′09″E | 52.525 | 13.369166666666667 | |
QQK | King's Cross railway station, London, UK | 51°31′51″N | 0°07′24″W | 51.530833333333334 | -0.12333333333333334 | |
QQM | Manchester Piccadilly station, Manchester, UK | 53°28′37″N | 2°13′48″W | 53.47694444444445 | -2.23 | |
QQN | Birmingham New Street railway station, Birmingham, UK | 52°28′40″N | 1°53′56″W | 52.47777777777778 | -1.8988888888888888 | |
QQP | Paddington railway station, London, UK | 51°31′02″N | 0°10′39″W | 51.51722222222222 | -0.1775 | |
QQS | St Pancras railway station, London, UK | 51°31′48″N | 0°07′30″W | 51.53 | -0.125 | |
QQU | Euston railway station, London, UK | 51°31′42″N | 0°07′59″W | 51.52833333333333 | -0.13305555555555557 | |
QQW | Waterloo station, London, UK | 51°30′11″N | 0°06′48″W | 51.503055555555555 | -0.11333333333333334 | |
QQY | York railway station, Yorkshire | 53°57′30″N | 1°05′35″W | 53.958333333333336 | -1.0930555555555554 | |
QRH | Rotterdam Centraal railway station, Netherlands | 51°55′28″N | 4°28′10″E | 51.92444444444444 | 4.469444444444445 | |
QXB | Aix-en-Provence TGV railway station, Aix-en-Provence, France | 43°27′18″N | 5°19′2″E | 43.455000000000005 | 5.317222222222222 | |
QXG | Gare d'Angers-Saint-Laud, Saint-Laud, Angers, France | 47°27′53″N | 0°33′25″W | 47.46472222222223 | -0.5569444444444445 | |
QYG | collective code for all German railway stations | 0°0′0″N | 0°0′0″E | 0.0 | 0.0 | |
QYX | Uppsala Central Station, Uppsala, Sweden | 59°51′31″N | 17°38′46″E | 59.85861111111111 | 17.64611111111111 | |
SIA | Southend Airport railway station at London Southend Airport (IATA: SEN, ICAO: EGMC), United Kingdom | 51°34′07″N | 0°42′19″E | 51.56861111111112 | 0.7052777777777778 | |
SOO | Söderhamn railway station, Sweden (same code as the old airport which has no scheduled flights anymore) | 61°18′N | 17°05′E | 61.3 | 17.083333333333332 | |
STN | Stansted Airport railway station (Stansted Express, underneath airport of same code) | 51°53′20″N | 0°15′40″E | 51.888888888888886 | 0.2611111111111111 | |
SWS | Swansea railway station, Wales, United Kingdom | 51°37′31″N | 3°56′27″W | 51.625277777777775 | -3.9408333333333334 | |
THN | Trollhättan railway station, Sweden (6 kilometres (3.7 mi) from the airport) | 58°17′N | 12°17′E | 58.28333333333333 | 12.283333333333333 | |
TRD | Trondheim Airport Station, Norway (walking distance from the airport) | 63°27′16″N | 10°54′50″E | 63.45444444444445 | 10.91388888888889 | |
TTK | Tottenham Hale station, London, United Kingdom (no airport) | 51°35′18″N | 0°03′35″W | 51.58833333333334 | -0.059722222222222225 | |
VST | Västerås railway station, Sweden (6 kilometres (3.7 mi) from the airport) | 59°36′58″N | 16°33′10″E | 59.61611111111111 | 16.552777777777777 | |
VXO | Växjö railway station, Sweden (9 kilometres (5.6 mi) from the airport) | 56°52′37″N | 14°48′33″E | 56.87694444444445 | 14.809166666666668 | |
XAT | Gare d'Antibes, Antibes, France | 43°35′9″N | 7°7′10″E | 43.58583333333333 | 7.1194444444444445 | |
XAX | Dorval, Montréal, Canada (2 kilometres (1.2 mi) from Montréal–Pierre Elliott Trudeau International Airport (IATA: YUL, ICAO: CYUL)) | 45°26′56″N | 73°44′29″W | 45.44888888888889 | -73.74138888888889 | |
XCG | Gare de Cagnes-sur-Mer, Cagnes-sur-Mer, France | 43°39′28″N | 7°8′53″E | 43.657777777777774 | 7.148055555555556 | |
XDB | Gare de Lille Europe, Lille, France | 50°38′22″N | 3°04′31″E | 50.63944444444444 | 3.075277777777778 | |
XDH | Jasper railway station, Jasper, Alberta, Canada | 52°52′34″N | 118°04′47″W | 52.876111111111115 | -118.07972222222222 | |
XDS | Ottawa Train Station, Ottawa, Canada | 45°24′59″N | 75°39′06″W | 45.41638888888889 | -75.65166666666667 | |
XDV | Prince George railway station, Prince George, British Columbia, Canada | 53°55′09″N | 122°44′39″W | 53.91916666666666 | -122.74416666666667 | |
XDW | Prince Rupert railway station, Prince Rupert, British Columbia, Canada | 54°17′45″N | 130°21′07″W | 54.295833333333334 | -130.35194444444443 | |
XDZ | The Pas railway station, The Pas, Manitoba, Canada | 53°49′26″N | 101°14′50″W | 53.823888888888895 | -101.24722222222222 | |
XEA | Pacific Central Station, Vancouver, Canada | 49°16′25.4″N | 123°05′52.5″W | 49.27372222222222 | -123.09791666666666 | |
XED | Gare de Marne-la-Vallée – Chessy, France (for Disneyland Paris) | 48°52′11″N | 2°46′58″E | 48.86972222222222 | 2.7827777777777776 | |
XEF | Union Station, Winnipeg, Manitoba, Canada | 49°53′20″N | 97°08′03″W | 49.888888888888886 | -97.13416666666667 | |
XEV | Stockholm Central Station, Sweden | 59°19′48″N | 18°03′22″E | 59.330000000000005 | 18.05611111111111 | |
XEW | Flemingsberg railway station (formerly Stockholm Syd Flemingsberg), Sweden | 0°0′0″N | 0°0′0″E | 0.0 | 0.0 | |
XFF | Gare de Calais-Fréthun, Calais, France | 50°54′07″N | 1°48′43″E | 50.901944444444446 | 1.8119444444444446 | |
XFJ | Eskilstuna Central station, Eskilstuna, Sweden | 59°21′59″N | 16°30′30″E | 59.36638888888889 | 16.508333333333333 | |
XFP | Malmö Central Station, Sweden | 55°36′34″N | 13°00′03″E | 55.60944444444445 | 13.000833333333333 | |
XGB | Gare Montparnasse, Paris, France | 48°50′24″N | 2°19′07″E | 48.84 | 2.3186111111111107 | |
XGC | Lund Central Station, Sweden | 55°42′19″N | 13°11′14″E | 55.70527777777778 | 13.187222222222223 | |
XGH | Flåm Station, Norway | 60°51′47″N | 7°06′50″E | 60.863055555555555 | 7.113888888888889 | |
XGJ | Cobourg railway station, Canada | 43°58′05″N | 78°10′15″W | 43.96805555555556 | -78.17083333333333 | |
XHJ | Aachen Hauptbahnhof, Aachen, Germany | 50°46′03″N | 6°05′28″E | 50.7675 | 6.091111111111111 | |
XHK | Gare de Valence TGV railway station, Valence, Drôme, France | 44°59′30″N | 4°58′43″E | 44.99166666666667 | 4.978611111111111 | |
XIA | Guelph Central Station, Canada | 43°32′39″N | 80°14′49″W | 43.54416666666666 | -80.24694444444445 | |
XIT | Leipzig Hauptbahnhof, Leipzig, Germany | 51°20′43″N | 12°22′56″E | 51.34527777777778 | 12.382222222222223 | |
XIZ | Gare de Champagne-Ardenne TGV, Reims, France | 49°12′54″N | 3°59′38″E | 49.215 | 3.993888888888889 | |
XJY | Gare de Massy TGV, Massy, France | 48°43′34″N | 2°15′42″E | 48.726111111111116 | 2.2616666666666667 | |
XKL | KL Sentral railway station, Kuala Lumpur, Malaysia | 3°08′02″N | 101°41′10″E | 3.133888888888889 | 101.68611111111112 | |
XLM | Saint-Lambert (AMT) station, Montreal, Canada | 45°29′57″N | 73°30′26″W | 45.49916666666667 | -73.50722222222223 | |
XLV | Niagara Falls (VIA) station, Niagara Falls, Canada | 43°06′32″N | 79°03′48″W | 43.10888888888889 | -79.06333333333333 | |
XOP | Poitiers railway station, Poitiers, France | 46°34′56″N | 0°19′59″E | 46.58222222222223 | 0.33305555555555555 | |
XPG | Gare du Nord, Paris, France | 48°52′51″N | 2°21′19″E | 48.880833333333335 | 2.355277777777778 | |
XPH | Port Hope railway station, Canada | 43°56′46″N | 78°17′41″W | 43.94611111111111 | -78.29472222222222 | |
XPJ | Gare de Montpellier Saint-Roch, Montpellier, France | 43°36′16.69″N | 3°52′51.74″E | 43.60463611111111 | 3.881038888888889 | |
XQE | Ebbsfleet International railway station, Ebbsfleet Valley, UK (Eurostar) | 51°26′34.94″N | 0°19′15.18″E | 51.443038888888886 | 0.3208833333333333 | |
XQT | Lichfield Trent Valley railway station, UK | 52°41′12″N | 1°48′01″W | 52.68666666666666 | -1.8002777777777779 | |
XRG | Rugeley Trent Valley railway station, UK | 52°46′12″N | 1°55′48″W | 52.769999999999996 | -1.93 | |
XRF | Gare de Marseille Saint-Charles, Marseille, France | 43°18′11″N | 5°22′52″E | 43.30305555555555 | 5.38111111111111 | |
XRK | Paveletsky Rail Terminal, Moscow, Russia | 55°43′47″N | 37°38′22″E | 55.72972222222222 | 37.63944444444444 | |
XSH | Tours Saint-Pierre-des-Corps railway station, Tours, France | 47°23′29″N | 0°43′44″E | 47.39138888888889 | 0.7288888888888889 | |
XUK | Xuzhou Railway Station, Xuzhou, Jiangsu, China | 34°16′2″N | 117°12′2″E | 34.26722222222222 | 117.20055555555555 | |
XWG | Gare de Strasbourg, France | 48°35′06″N | 7°44′04″E | 48.585 | 7.734444444444445 | |
XWK | Karlskrona railway station, Sweden | 56°9′39″N | 15°35′10″E | 56.16083333333333 | 15.586111111111112 | |
XWL | Gothenburg Central Station, Sweden | 57°42′32″N | 11°58′24″E | 57.70888888888889 | 11.973333333333333 | |
XWR | Örebro railway station, Sweden | 59°16′26″N | 15°12′27″E | 59.27388888888889 | 15.2075 | |
XXL | Lillehammer Station, Norway | 61°6′51.73″N | 10°27′40.69″E | 61.11436944444445 | 10.461302777777776 | |
XXZ | Sundsvall railway station, Sweden | 62°24′N | 17°19′E | 62.4 | 17.316666666666666 | |
XYB | Borlänge railway station, Sweden | 60°29′08″N | 15°26′11″E | 60.48555555555556 | 15.436388888888889 | |
XYD | Gare de Lyon-Part-Dieu, Lyon, France | 45°45′38″N | 4°51′34″E | 45.760555555555555 | 4.859444444444444 | |
XYG | Praha hlavní nádraží, Prague, Czech Republic | 50°4′59″N | 14°26′09″E | 50.08305555555556 | 14.435833333333333 | |
XYM | Falkenberg Railway Station, Falkenberg, Sweden | 0°0′0″N | 0°0′0″E | 0.0 | 0.0 | |
XYH | Helsingborg railway station, Sweden | 56°03′N | 12°43′E | 56.05 | 12.716666666666667 | |
XYJ | Praha-Holešovice, Prague, Czech Republic | 50°5′N | 14°25′E | 50.083333333333336 | 14.416666666666666 | |
XYL | Gare de Lyon-Perrache railway station, Lyon, France | 45°44′54″N | 4°49′32″E | 45.748333333333335 | 4.825555555555555 | |
XZI | Gare de Lorraine TGV, Metz–Nancy area, France | 48°56′51″N | 6°10′11″E | 48.9475 | 6.169722222222222 | |
XZN | Gare d'Avignon TGV railway station, Avignon, France | 43°55′18″N | 4°47′9″E | 43.92166666666667 | 4.785833333333334 | |
XZO | Oslo Central Station, Norway | 59°54′40″N | 10°45′3″E | 59.91111111111111 | 10.750833333333333 | |
XZT | Trondheim Central Station, Norway | 63°26′11″N | 10°23′56″E | 63.436388888888885 | 10.398888888888889 | |
XZV | Gare de Toulon, Toulon, France | 43°7′43″N | 5°55′47″E | 43.12861111111111 | 5.929722222222223 | |
YBZ | Toronto Union Station, Ontario, Canada (about 3 km from Billy Bishop Toronto City Airport (IATA: YTZ, ICAO: CYTZ) by ferry) | 43°38′43″N | 79°22′50″W | 43.64527777777778 | -79.38055555555555 | |
YCM | St. Catharines railway station, Ontario, Canada | 43°08′52″N | 79°15′23″W | 43.147777777777776 | -79.25638888888889 | |
YIU | Yiwu Railway Station, part of the Hukun Railway, located in Zhejiang, China | 29°22′51″N | 120°2′16″E | 29.380833333333335 | 120.03777777777778 | |
YJD | Barcelona Estació de França, Barcelona, Spain | 41°23′02″N | 2°11′10″E | 41.38388888888889 | 2.186111111111111 | |
YJH | Estación_de_San_Sebastián, San Sebastián, Spain | 0°0′0″N | 0°0′0″E | 0.0 | 0.0 | |
YJV | Estación de Nord Valencia, Valencia, Spain | 0°0′0″N | 0°0′0″E | 0.0 | 0.0 | |
YMY | Montreal Central Station, Quebec, Canada (no longer an airport) | 45°29′59″N | 73°34′00″W | 45.499722222222225 | -73.56666666666666 | |
ZAQ | Nürnberg Hauptbahnhof, Nuremberg, Germany | 49°26′47″N | 11°04′55″E | 49.44638888888888 | 11.081944444444444 | |
ZBA | Basel Badischer Bahnhof, Switzerland | 47°34′5″N | 7°36′23″E | 47.56805555555556 | 7.606388888888889 | |
ZBP | Pennsylvania Station, Baltimore, Maryland, United States | 39°18′26.64″N | 76°36′56.16″W | 39.307399999999994 | -76.6156 | |
ZDH | Basel SBB railway station, Switzerland | 47°32′51″N | 7°35′23″E | 47.5475 | 7.589722222222222 | |
ZDJ | Bern railway station, Switzerland | 46°56′59″N | 07°26′22″E | 46.94972222222222 | 7.439444444444445 | |
ZDU | Dundee railway station, Dundee, Scotland | 56°27′24″N | 2°58′16″W | 56.45666666666667 | -2.971111111111111 | |
ZEP | Victoria station, London, United Kingdom | 51°29′48″N | 0°08′41″W | 51.49666666666667 | -0.14472222222222222 | |
ZEU | Göttingen railway station, Göttingen, Germany | 51°32′12″N | 9°55′37″E | 51.53666666666666 | 9.926944444444445 | |
ZFJ | Gare de Rennes, France | 48°06′12″N | 1°40′21″W | 48.10333333333333 | -1.6724999999999999 | |
ZFQ | Gare de Bordeaux Saint-Jean, Bordeaux, France | 44°49′32″N | 0°33′20″W | 44.82555555555556 | -0.5555555555555556 | |
ZFV | 30th Street Station, Philadelphia, Pennsylvania, United States | 39°57′20.96″N | 75°10′56.64″W | 39.955822222222224 | -75.1824 | |
ZGG | Glasgow Central station, Scotland | 55°51′29″N | 4°15′29″W | 55.85805555555556 | -4.258055555555556 | |
ZGH | Copenhagen Central Station, Denmark | 55°40′22″N | 12°33′52″E | 55.672777777777775 | 12.564444444444446 | |
ZIV | Inverness railway station, Inverness, Scotland | 57°28′48″N | 4°13′23″W | 57.480000000000004 | -4.223055555555556 | |
ZKD | Leningradsky Rail Terminal, Moscow, Russia | 55°46′34″N | 37°39′19″E | 55.77611111111111 | 37.655277777777776 | |
ZLN | Le Mans railway station, France | 48°00′28″N | 0°11′54″E | 48.007777777777775 | 0.1983333333333333 | |
ZLS | Liverpool Street Station, London, United Kingdom | 51°31′07″N | 0°04′53″W | 51.51861111111111 | -0.08138888888888889 | |
ZLY | Albany–Rensselaer (Amtrak station), Rensselaer, New York, United States | 42°38′29″N | 73°44′28″W | 42.64138888888889 | -73.74111111111111 | |
ZMB | Hamburg Hauptbahnhof, Hamburg, Germany | 53°33′10″N | 10°00′23″E | 53.55277777777778 | 10.006388888888889 | |
ZMI | Mergellina railway station, Naples, Italy | 0°0′0″N | 0°0′0″E | 0.0 | 0.0 | |
ZMS | Firenze Santa Maria Novella railway station, Florence, Italy | 43°46′34″N | 11°14′53″E | 43.77611111111111 | 11.248055555555554 | |
ZMU | München Hauptbahnhof, Munich, Germany | 48°08′27″N | 11°33′18″E | 48.14083333333333 | 11.555000000000001 | |
ZPY | Siegburg/Bonn railway station, Siegburg, Germany | 50°47′37″N | 7°12′10″E | 50.79361111111111 | 7.202777777777778 | |
ZRB | Frankfurt (Main) Hauptbahnhof, Frankfurt, Germany | 50°06′25″N | 8°39′45″E | 50.106944444444444 | 8.6625 | |
ZRH | Zürich International Airport railway station, Zürich, Switzerland (same code as the airport) | 47°27′53″N | 008°32′57″E | 47.46472222222223 | 8.549166666666666 | |
ZRL | Lancaster (Amtrak station), Lancaster, Pennsylvania, United States | 40°3′15.71″N | 76°18′27.80″W | 40.054363888888886 | -76.30772222222222 | |
ZRP | Pennsylvania Station, Newark, New Jersey, United States | 40°44′5″N | 74°9′51″W | 40.734722222222224 | -74.16416666666667 | |
ZRT | Hartford Union Station, Hartford, Connecticut, United States | 41°46′08″N | 72°40′54″W | 41.76888888888889 | -72.68166666666667 | |
ZRV | Providence Station, Providence, Rhode Island, United States | 41°49′45″N | 71°24′48″W | 41.82916666666667 | -71.41333333333334 | |
ZRZ | New Carrollton (WMATA station), New Carrollton, Maryland, United States | 38°56′53″N | 76°52′19″W | 38.948055555555555 | -76.87194444444444 | |
ZSB | Salzburg Hauptbahnhof ÖBB station, Salzburg, Austria | 47°48′47″N | 13°2′48″E | 47.81305555555555 | 13.046666666666667 | |
ZSF | Springfield Union Station, Springfield, Massachusetts, United States | 42°06′22″N | 72°35′35″W | 42.10611111111111 | -72.59305555555555 | |
ZTD | Schenectady (Amtrak station), Schenectady, New York, United States | 42°48′53″N | 73°56′34″W | 42.81472222222222 | -73.94277777777778 | |
ZTE | Rochester (Amtrak station), Rochester, New York, United States | 43°09′49″N | 77°36′30″W | 43.16361111111111 | -77.60833333333333 | |
ZTF | Stamford (Metro-North station), Stamford, Connecticut, United States | 41°02′49″N | 73°32′29″W | 41.04694444444444 | -73.54138888888889 | |
ZTJ | Princeton Junction (NJT station), Princeton Junction, New Jersey, United States | 40°19′00″N | 74°37′24″W | 40.31666666666667 | -74.62333333333332 | |
ZTO | South Station, Boston, Massachusetts, United States | 42°21′07″N | 71°03′19″W | 42.35194444444445 | -71.05527777777777 | |
ZTY | Back Bay (MBTA station), Boston, Massachusetts, United States | 42°20′50″N | 71°04′32″W | 42.34722222222222 | -71.07555555555555 | |
ZUA | Utica Union Station, Utica, New York, United States | 43°6′15″N | 75°13′24″W | 43.10416666666667 | -75.22333333333333 | |
ZUG | Harrisburg Transportation Center, Harrisburg, Pennsylvania, United States | 40°15′43″N | 76°52′40″W | 40.261944444444445 | -76.87777777777777 | |
ZVE | Union Station, New Haven, Connecticut, United States | 41°17′51″N | 72°55′37″W | 41.2975 | -72.92694444444444 | |
ZVM | Hannover Messe Bahnhof, Germany | 52°19′26″N | 9°48′10″E | 52.323888888888895 | 9.802777777777779 | |
ZVR | Hannover Hauptbahnhof, Germany | 52°22′38″N | 9°44′30″E | 52.37722222222222 | 9.741666666666665 | |
ZWC | Stavanger station, Hanover, Norway | 58°58′01″N | 5°43′55″E | 58.966944444444444 | 5.731944444444444 | |
ZWE | Antwerpen-Centraal railway station, Antwerp, Belgium | 51°13′02″N | 4°25′16″E | 51.217222222222226 | 4.421111111111111 | |
ZWI | Wilmington Station, Wilmington, Delaware, United States | 39°44′12″N | 75°33′04″W | 39.736666666666665 | -75.55111111111111 | |
ZWS | Stuttgart Hauptbahnhof, Germany | 48°47′02″N | 9°10′54″E | 48.78388888888889 | 9.181666666666667 | |
ZWU | Union Station, Washington, D.C., United States | 38°53′50″N | 77°00′23″W | 38.89722222222222 | -77.00638888888889 | |
ZXA | Aberdeen railway station, Scotland | 57°08′37″N | 2°05′55″W | 57.14361111111111 | -2.0986111111111114 | |
ZXE | Edinburgh Waverley railway station, Scotland | 55°57′08″N | 3°11′21″W | 55.952222222222225 | -3.1891666666666665 | |
ZXS | Buffalo-Exchange Street Station, Buffalo, New York, United States | 42°52′42″N | 78°52′26″W | 42.87833333333333 | -78.87388888888889 | |
ZYA | Amsterdam Centraal railway station, The Netherlands | 52°22′42″N | 4°54′0″E | 52.37833333333333 | 4.9 | |
ZYN | Nîmes railway station, Nîmes, France | 43°49′57″N | 4°21′59″E | 43.8325 | 4.366388888888888 | |
ZYP | Pennsylvania Station, New York City, New York, United States | 40°45′02″N | 73°59′38″W | 40.75055555555556 | -73.99388888888889 | |
ZYQ | Syracuse (Amtrak station), Syracuse, New York, United States | 43°04′36″N | 76°10′09″W | 43.07666666666667 | -76.16916666666667 | |
ZYR | Brussels-South railway station [Midi/Zuid], Brussels, Belgium | 50°50′07″N | 4°20′07″E | 50.83527777777778 | 4.335277777777778 | |
ZYZ | Berchem railway station, Antwerp, Belgium | 49°32′28″N | 06°07′47″E | 49.54111111111111 | 6.129722222222222 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment