emuller at adobe.com
Sun Sep 28 04:37:32 UTC 2008
Jesper Norgaard Welen wrote:
> Of course you would need the Latitude and Longitude of the airport codes
> to do what *you* mentioned, but I assume that would be trivial?
The UN/LOCODE (CODE FOR TRADE AND TRANSPORT LOCATIONS) database has
coordinates for many locations, and airport codes for airports.
Generating the list for all the airports should be relatively trivial if
you put the map in spatially-enabled database such as PostGIS. Something
SELECT unlocode.code, tz.tzid
FROM unlocode, tz
WHERE ST_within (tz.geom, unlocode.location)
AND unlocode.class = airport;
assuming that unlocode is a table for the UN/LOCODE database and the
coordinates have been turned into point geometries (of course, the SQL
above is just the idea)
The main difficulty would be to have a good enough map, so that the
UN/LOCODE coordinates do not fall in water. May be a bit of buffering
around the point and an intersection with tz polygons would do the trick.
More information about the tz