Yes, but the airport is not in the center of town. What is usually the case is the public transit takes you to the center, and then you take a second trip to the airport. Meanwhile the train station is generally a lot closer. These aren't particularly good examples because they are from the US and also what I have experience with, but if you look at say San Jose the public transit converges on Diridon and from there you can take the light rail to a vaguely airport-ish location. In SF you can take city transit to the BART backbone down market, then you take BART to the actual airport way down near Millbrae. Meanwhile the actual station (again, we're stretching it because San Francisco doesn't actually have long-distance rail) for, say, Caltrain is well-connected and much closer.