I calculated all the distances from all the airports available from OpenFlights. The raw (CSV) data is available from them (this is the airports.dat.txt
file in the code below).
The code to do that is really quick and really dirty (it needs to be ran by a 64 bits interpreter otherwise you may get a cryptic MemoryError
exception) . It goes through all airport pairs and computes the distance of the ones in different countries:
import csv
import time
import random
import itertools
import math
def distance(origin, destination):
"""
Credits go to Martin Thoma: https://stackoverflow.com/a/38187562/903011
"""
lat1, lon1 = origin
lat2, lon2 = destination
radius = 6371 # km
dlat = math.radians(lat2 - lat1)
dlon = math.radians(lon2 - lon1)
a = (math.sin(dlat / 2) * math.sin(dlat / 2) +
math.cos(math.radians(lat1)) * math.cos(math.radians(lat2)) *
math.sin(dlon / 2) * math.sin(dlon / 2))
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
d = radius * c
return d
with open('airports.dat.txt', encoding='utf-8') as f:
reader = csv.reader(f)
data = list(list(rec) for rec in csv.reader(f, delimiter=','))
all_combinations = len(data) * len(data)
distances = []
counter = 0
start = time.time()
# data = [random.choice(data) for _ in range(20)]
for a in itertools.combinations(data, 2):
counter += 1
if counter % 100000 == 0:
print(f"{2*counter/all_combinations*100}%, time since start: {time.time()-start}")
a1_name = a[0][1]
a1_code = a[0][4]
a1_coord = (float(a[0][6]), float(a[0][7]))
a1_country = a[0][3]
a2_name = a[1][1]
a2_code = a[1][4]
a2_coord = (float(a[1][6]), float(a[1][7]))
a2_country = a[1][3]
if a1_country == a2_country:
# print(f"{a1_name} and {a2_name} are in the same country")
continue
else:
dist = distance(a1_coord, a2_coord)
# print(f"distance between {a1_name} and {a2_name} is {dist}km")
distances.append((a1_name, a1_code, a2_name, a2_code, dist))
distances = sorted(distances, key=lambda tup: tup[4])
for pair in distances[:100]:
print(f"{pair[0]} ({pair[1]}) -- {pair[2]} ({pair[3]}): {pair[4]} km")
After about 5 minutes on my laptop, this is the top 100 of the airports. I do not know which of these are commercial and which not:
Whiting Field Naval Air Station - North (NSE) -- Whiting Field Naval Air Station South Airport (\N): 2.204219269322024 km
Goma International Airport (GOM) -- Gisenyi Airport (GYI): 2.376034712933963 km
General Abelardo L. Rodríguez International Airport (TIJ) -- Brown Field Municipal Airport (SDM): 3.5937420212144517 km
Albina Airport (ABN) -- Saint-Laurent-du-Maroni Airport (LDX): 3.727716157238799 km
Oiapoque Airport (OYK) -- Saint-Georges-de-l'Oyapock Airport (OYP): 4.750026056815431 km
Elorza Airport (EOZ) -- El Fuentero Airport (\N): 5.820479866826561 km
Santa Bárbara del Zulia Airport (STB) -- Central Bolívar Airport (\N): 6.527875713491793 km
Tabatinga Airport (TBT) -- Alfredo Vásquez Cobo International Airport (LET): 6.956027869556535 km
Teniente Coronel Luis a Mantilla Airport (TUA) -- San Luis Airport (IPI): 7.0895945663591355 km
Guajará-Mirim Airport (GJM) -- Capitán de Av. Emilio Beltrán Airport (GYA): 7.652459349658333 km
Eilat Airport (ETH) -- Aqaba King Hussein International Airport (AQJ): 7.920877525295644 km
Digby (General Hospital) Heliport (\N) -- Digby / Annapolis Regional Airport (YDG): 8.03110110285801 km
Newnan Coweta County Airport (\N) -- Newnan Hospital Heliport (\N): 8.233077390019632 km
Puerto Obaldia Airport (PUE) -- Capurganá Airport (CPB): 8.360403180249316 km
Alexander Bay Airport (ALJ) -- Oranjemund Airport (OMD): 8.524733444038716 km
Gibraltar Airport (GIB) -- Algeciras Heliport (AEI): 8.57959640858818 km
Stoelmanseiland Airport (SMZ) -- Grand-Santi Airport (GSI): 8.619300251765623 km
Antwerp International Airport (Deurne) (ANR) -- Engels heliport (\N): 8.756765171742803 km
L'Espérance Airport (SFG) -- Princess Juliana International Airport (SXM): 9.242947571038272 km
Oceanside Municipal Airport (OCN) -- Camp Pendleton MCAS (Munn Field) Airport (\N): 9.340802654049627 km
Long Beach /Daugherty Field/ Airport (LGB) -- Los Alamitos Army Air Field (\N): 9.739378362552664 km
Falls International Airport (INL) -- Fort Frances Municipal Airport (YAG): 10.148485019124823 km
Livingstone Airport (LVI) -- Spray View Airport (\N): 10.602891253894743 km
Barkarby Airport (\N) -- Skå-Edeby Airport (\N): 11.129095987348393 km
Los Alamitos Army Air Field (\N) -- Fullerton Municipal Airport (FUL): 11.285667993623937 km
Bakalalan Airport (BKM) -- Long Bawan Airport (LBW): 11.413010333693933 km
Stockholm-Bromma Airport (BMA) -- Skå-Edeby Airport (\N): 11.452182506589086 km
L'Espérance Airport (SFG) -- Clayton J Lloyd International Airport (AXA): 11.694253361399241 km
Maya-Maya Airport (BZV) -- Ndolo Airport (NLO): 11.73528101416698 km
Mc Clellan-Palomar Airport (CLD) -- Oceanside Municipal Airport (OCN): 12.057037359582235 km
RAF Scampton (SQZ) -- Sturgate Airfield (\N): 12.086595126936034 km
Camilo Daza International Airport (CUC) -- San Antonio Del Tachira Airport (SVZ): 12.472917391519752 km
Aqaba King Hussein International Airport (AQJ) -- Ramon Airport (ETM): 12.480909327116564 km
Flensburg-Schäferhaus Airport (FLF) -- Kruså-Padborg Airport (\N): 12.537692105079154 km
Winter Haven Regional Airport - Gilbert Field (GIF) -- Orlampa Inc Airport (\N): 12.761862096541233 km
Los Chiles Airport (LSL) -- San Carlos (NCR): 12.9461506065242 km
Zutendaal Air Base (\N) -- Maastricht Aachen Airport (MST): 13.200028870425097 km
Annemasse Airport (QNJ) -- Geneva Cointrin International Airport (GVA): 13.29536910680905 km
Kleine Brogel Air Base (\N) -- Budel Airfield Kempen (\N): 13.317101521572054 km
Zoersel (Oostmalle) Airfield (OBL) -- Engels heliport (\N): 13.378693617154335 km
Cataratas Del Iguazú International Airport (IGR) -- Helisul I Heliport (\N): 14.941643996462945 km
Paso De Los Libres Airport (AOL) -- Rubem Berta Airport (URG): 15.08047542096028 km
Nasa Shuttle Landing Facility Airport (\N) -- Space Coast Regional Airport (TIX): 15.122382163940879 km
St Gallen Altenrhein Airport (ACH) -- Hohenems-Dornbirn Airport (HOH): 15.274664732089121 km
Cataratas Del Iguazú International Airport (IGR) -- Cataratas International Airport (IGU): 15.280461553472668 km
Chacarita Airport (JAP) -- San Agustin Airport (\N): 15.382601484369282 km
Cooma Snowy Mountains Airport (OOM) -- Cooma Hospital Helipad (\N): 15.433257279695518 km
Quetzalcóatl International Airport (NLD) -- Laredo International Airport (LRD): 15.452619796200898 km
Windsor Airport (YQG) -- Coleman A. Young Municipal Airport (DET): 15.511464756627047 km
Cataratas Del Iguazú International Airport (IGR) -- Helisul IV Heliport (\N): 15.744134592091264 km
Comodoro Pierrestegui Airport (COC) -- Nueva Hesperides International Airport (STY): 15.78166177559867 km
Corumbá International Airport (CMG) -- Capitán Av. Salvador Ogaya G. airport (PSZ): 16.208395127479214 km
Colmar-Meyenheim Air Base (\N) -- Bremgarten Airport (\N): 16.395524194505356 km
Ponta Porã Airport (PMG) -- Dr Augusto Roberto Fuster International Airport (PJC): 16.495662675391504 km
Wevelgem Airport (KJK) -- Lille/Marcq-en-Baroeul Airport (\N): 17.074059628767692 km
Ciudad Acuña New International Airport (ACN) -- Del Rio International Airport (DRT): 17.29070806991974 km
Birchwood Airport (\N) -- Wasilla Airport (WWA): 17.346129243725695 km
Limbang Airport (LMN) -- Brunei International Airport (BWN): 17.632144935361755 km
Eilat Airport (ETH) -- Taba International Airport (TCP): 17.845677360521062 km
General Servando Canales International Airport (MAM) -- Brownsville South Padre Island International Airport (BRO): 18.184529218610706 km
Bryant Army Heliport (FRN) -- Birchwood Airport (\N): 18.41702338215028 km
General Lucio Blanco International Airport (REX) -- Mc Allen Miller International Airport (MFE): 18.585865661975248 km
Princess Juliana International Airport (SXM) -- Clayton J Lloyd International Airport (AXA): 19.080421428310835 km
Weelde Air Base (\N) -- Gilze Rijen Air Base (GLZ): 19.292861917213006 km
Haguenau Airport (\N) -- Karlsruhe Baden-Baden Airport (FKB): 19.33099328738962 km
Santiago Perez Airport (AUC) -- Guasdalito Airport (GDO): 19.56686649530782 km
Abraham González International Airport (CJS) -- El Paso International Airport (ELP): 19.6273625476994 km
Maastricht Aachen Airport (MST) -- Geilenkirchen Air Base (GKE): 19.845306905760378 km
Bukavu Kavumu Airport (BKY) -- Kamembe Airport (KME): 20.288865355601136 km
Chris Hadfield Airport (YZR) -- St Clair County International Airport (PHN): 20.42508511135114 km
Boeing Field King County International Airport (BFI) -- Berkley Structures Heliport (\N): 20.453439163821063 km
Niagara Falls International Airport (IAG) -- Niagara District Airport (YCM): 20.56058515457646 km
Nasa Shuttle Landing Facility Airport (\N) -- Cape Canaveral AFS Skid Strip (\N): 20.60921839454631 km
Montbéliard-Courcelles Airfield (\N) -- Bressaucourt Airport (\N): 20.7530177341854 km
Strasbourg Neuhof Airfield (\N) -- Lahr Airport (LHA): 20.905381610721815 km
Retford Gamston Airport (\N) -- Sturgate Airfield (\N): 20.907986997172568 km
Friedrichshafen Airport (FDH) -- St Gallen Altenrhein Airport (ACH): 21.042656673444654 km
Alcides Fernández Airport (ACD) -- Puerto Obaldia Airport (PUE): 21.159881768303638 km
John Wayne Airport-Orange County Airport (SNA) -- Los Alamitos Army Air Field (\N): 21.23832340707818 km
Peachtree City Falcon Field (\N) -- Newnan Hospital Heliport (\N): 21.44578018521332 km
Berkley Structures Heliport (\N) -- Renton Municipal Airport (RNT): 21.611699031965994 km
Weeze Airport (NRN) -- De Peel Air Base (\N): 21.9470037028662 km
Libertador Gral D Jose De San Martin Airport (PSS) -- Encarnación Airport (ENO): 21.990381020128478 km
Sandtoft Airfield (\N) -- Sturgate Airfield (\N): 22.925806746136672 km
Aqaba King Hussein International Airport (AQJ) -- Taba International Airport (TCP): 23.354696853503192 km
Soyo Airport (SZA) -- Muanda Airport (MNB): 23.4808814492647 km
Annemasse Airport (QNJ) -- La Côte Airport (\N): 23.853111940546963 km
Strasbourg Airport (SXB) -- Lahr Airport (LHA): 23.86563301419125 km
Orcas Island Airport (ESD) -- Bedwell Harbour Seaplane Base (YBW): 24.14239685478733 km
Abraham González International Airport (CJS) -- Biggs Army Air Field (Fort Bliss) (BIF): 24.177211754945507 km
El Gora Airport (EGH) -- Yasser Arafat International Airport (GZA): 24.193119302041364 km
Robin Hood Doncaster Sheffield Airport (DSA) -- Sturgate Airfield (\N): 24.226409097969242 km
San Sebastian Airport (EAS) -- Biarritz-Anglet-Bayonne Airport (BIQ): 24.372157974813707 km
Elmendorf Air Force Base (EDF) -- Birchwood Airport (\N): 24.38729482460421 km
Lugano Airport (LUG) -- Como (Idroscalo - Water Ad) Hidroport (\N): 24.41438697316744 km
Nogales International Airport (NOG) -- Nogales International Airport (OLS): 24.530061985790955 km
Pangborn Memorial Airport (EAT) -- Cascade Heliport (\N): 24.651231744868582 km
Bartow Municipal Airport (BOW) -- Orlampa Inc Airport (\N): 24.98105533950047 km
Itaipú Airport (\N) -- Helisul I Heliport (\N): 25.247666101530847 km
Cataratas International Airport (IGU) -- Itaipú Airport (\N): 25.323582618508542 km