Where are we flying? But what does “where” even mean?
Published: 2026-08-13
“Where are you flying?” is the simplest question you can ask a traveller. A person answers without thinking: Sardinia, the Alps, Crete, Masuria. A flight search answers differently — it only knows airport codes and city names. Type “Sardinia” into most of them and you get nothing at all, even though four airports serve the island. That gap between how people talk about a destination and what booking systems understand is one of the most interesting problems we had to solve at MeetInPlane. Here is how our “Where to?” field actually works — no charts, no formulas, but no hand-waving either.
“Where” is not a name. It is a set of airports
The key design decision is this: a destination is not a string, it is the set of airports that get you there. When you pick “Sardinia”, the system does not store the word “Sardinia” — it stores the list of IATA codes serving the island. When someone else picks “Cagliari”, their set contains one of those same codes. And that is why your trips find each other, even though neither of you typed the same word.
It sounds like a detail; it is the foundation. As long as a destination is text, “Crete”, “Kreta”, “Kriti” and “Heraklion” are four different places. Once a destination is a set of airports, all four are the same one — and they can match. In our system the airport set is the currency of matching: it is what we compare when we count how many travellers are heading where you are.
Places that appear in no flight schedule
People do not plan holidays at airports. They plan them on islands, in regions, in mountains and by lakes. But tourist regions are entities the airline booking world barely acknowledges. To learn about them we reached for an open geographic database of places — and that is where it got interesting, because the world is far less tidy than it looks.
Crete exists three times
In the geographic database, Crete has three separate records: as an island, as a region and as an administrative unit. Sardinia is filed as an island, Sicily as an administrative region. The same category of thing, three different classifications. Copy that across one-to-one and the dropdown shows you “Crete” three times in a row, with no way to tell which one to pick. So the import canonicalises duplicates: it picks a single winner, and the other records merely point at it. Only the winner ever reaches the search box.
The Alps have no country
The record for the Alps has an empty “country” column and eight country codes beside it: Austria, Switzerland, Germany, France, Italy, Liechtenstein, Monaco, Slovenia. For a database where a destination began with the question “which country?”, such a place simply cannot be stored. That was the second reason we moved to airport sets: the Alps do not need a country, a list of airports is enough. Innsbruck, Grenoble, Zurich, Milan. We show the countries afterwards, derived from the airports rather than from the place itself.
Masuria, Masuren, Mazury — one place, three spellings
The main name column holds exactly one version, and it is never the only one you need. Warsaw is filed as Warsaw, Kraków as Kraków, Masuria as Mazury. Everything else — Masuria, Masuren, Warschau, Warszawa, Krakau — lives in a separate alternate-names file: 742 MB and well over ten million rows. Without it, an English search never finds Masuria and a German one never finds Masuren. On top of that, many of those spellings carry no language tag at all, so alongside the English, Polish and German versions we also keep the “untagged” spelling — otherwise Masuria itself would drop out of the index. Worth noting: the entire category of tourist regions — Tuscany, Provence, Masuria — is a mere 2,580 rows for the whole planet. The most valuable bucket in the file is also the cheapest one to handle.
How thirteen million rows become eight suggestions
The source file is 1.7 GB and 13,455,020 rows. Your dropdown has eight entries. The whole job is throwing away the right thirteen million along the way.
The noise is in the villages, not the regions
Names like “Crete”, “Sardinia” and “Alps” appear dozens of times in the database — as unpopulated hamlets in the US and India. Villages under 200 inhabitants alone number close to five million, more than a third of the file. So the import applies a population threshold (500 by default), always admits capitals and administrative seats regardless, and only lets mountain peaks in above 1,500 m — or when they have names in several languages, which is a good sign somebody has actually heard of them.
How we know which airports are nearest
The same database that gives us names also gives us geographic coordinates — latitude and longitude — for every single record: for Masuria, for Zakopane, and for all 3,274 airports. Given two pairs of coordinates, the distance between them is measured along a great circle, the shortest arc across a sphere, rather than a straight line on a flat map. The classic tool for that is the haversine formula — a handful of trigonometric functions that turn a difference in coordinates into kilometres and, unlike naive Pythagoras, do not fall apart over long distances or near the poles.
The trouble is that computing this for every pair means a million places times 3,274 airports: 3.3 billion operations. So the airports go into a grid of one-degree cells first, and each lookup scans outward in rings — starting from the cell the place sits in — stopping as soon as nothing outside the searched block could possibly be closer than the best candidate found so far. The answer is exactly the same as measuring everything, except that instead of 3,274 distances we typically measure a dozen, and the whole grid weighs about 350 kB.
There is one trap that is easy to fall into: a degree of latitude is always about 111 km, but a degree of longitude is 111 km at the equator, 55 km at 60° north and 31 km up at the latitude of Tromsø. Count cells equally in both directions and Svalbard gets handed an airport that is not in fact the closest one. Hence the cosine of latitude in several places in the code, and a dedicated test for Longyearbyen.
Every kind of place has its own reach
A place gets airports within a radius that depends on what it is: regions, islands and mountain ranges reach 150 km, a city 60 km, a village or a lake 30 km. Those numbers are not cosmetic. At 60 km Warsaw holds Chopin and Modlin but not Łódź — which is exactly why two trips “to Warsaw” really do mean the same city. Make the radius more generous and you get more matches, all of them useless.
Zakopané, Zakopane, zakopane
What you type and what sits in the database go through precisely the same normalisation — no capitals, no accents, no diacritics. Otherwise the French “Zakopané” would never find Polish Zakopane. Search runs on the beginning of a name, so suggestions appear after two characters, and an exact hit on the full name earns a ranking bonus — but a bounded one. “Krak” taught us that: it is a genuine Polish alias for the county around Kraków, and for a while it outranked the city of 800,000 people the query obviously meant.
Warsaw twice in one list is a bug
Suggestions come from two indexes at once: the older one built from airports, and the new geographic one. They inevitably overlap. We merge them and remove duplicates by airport set: two suggestions covering exactly the same airports are the same destination however differently they were spelled, and only the better-ranked one survives. On top of that a name may appear once per country, so the list never says “Warsaw” twice. Crete in Greece and Crete in Nebraska keep their separate entries, because those really are two different places.
What this changes when you plan a trip
In practice, it means you can type what is in your head rather than what an airline has in its database. Type “Masuria” and you see how many travellers are heading there in your window. Type “the Alps” and the system understands that Innsbruck and Grenoble are the same winter. Type “Sardinia” and your trip matches someone who typed “Cagliari” — and that moment is precisely why we built MeetInPlane.
The rest happens outside the search box: we show matches with a readable reason (“same flight”, “same city in the same week”), never as a percentage score with nothing behind it. And if nobody is going your way yet, you can leave a single alert — we write once, when someone does.
Where the data comes from
The place database comes from GeoNames — an open, community-built geographic database published under the CC BY 4.0 licence. The licence requires attribution, and rightly so: this is more than a decade of work by thousands of people, and it is the reason we can know that Masuria is Masuren and that the Alps lie in eight countries. The credit sits permanently in the footer of every page on this site; here we add our thanks to it. The airport layer, the radii, the weights and the whole matching logic are ours.
Frequently asked questions
Can I search by region instead of by city?
Yes. Islands, regions, mountain ranges, parks, lakes and towns all work exactly like countries, cities and airports. Try “Sardinia”, “Masuria”, “Tuscany” or “the Alps”.
How do you know two people are flying “to the same place”?
From the overlap between the two trips’ airport sets. If they intersect, it is the same destination — no matter what each of you called it.
Does the search work in English, Polish and German?
Yes. The index keeps names in all three languages alongside the untagged original spelling, so “Masuria”, “Masuren” and “Mazury” all lead to the same place.
Do I need a ticket already?
No. A destination and a rough date window are enough — you can add the exact flight later.
Next time somebody asks where you are flying, answer the way you always do. The rest — the fact that “there” is really eight airport codes, three records for Crete and one mountain range with no country — is our job. Create a free MeetInPlane account and see who is heading where you are.