Geo::IATA - Search airports by iata, icao codes
This document describes Geo::IATA version 0.0.3
Airport codes where taken from wikipedia 2009-06-20. http://en.wikipedia.org/wiki/List_of_airports_by_IATA_code
use Geo::IATA; $g = Geo::IATA->new; print $g->icao2iata("EDDB"); # SXF print $g->iata2icao("SXF"); # EDDB print $g->iata2airport("SXF"); # Berlin-Schönefeld International Airport print $g->iata("SXF")->[0]{airport}; # same but with full resultset print map{$_->{airport}} @{$g->airport("A%")}; # all airport names starting with A print $g->icao("EDDB")->[0]{iata}; # SXF print map {$_->{iata} } @{$g->location("%France")}; # iata code for french airports
This module provides a SQLite DB for airport data. Searchable information are IATA,ICAO data airport name and location.
Geo::IATA is a pure oo module.
Constructor. A connection to internal SQLite DB is opened. You can optional specify the path to the sqlite database. The sqlite db default location is dirname($INC{Geo/IATA.pm})/IATA/iata_sqlite.db
Gets the dbh to internal sqlite database.
Input: iata, icao code, airport name or location. May use SQL wildcards.
Returns an arrayref of hashrefs of all matched rows for the query
select * from table where <field> like <arg>
[{iata => IATA,icao => ICAO, airport => AIRPORT,location => LOCATION}]
Simple from2to mapping methods. On multiple matches the first one is taken. Warning some iata codes have no mapping to icao code in wikipedia.
The module uses AUTOLOAD to call above queries.
Closes internal dbi connection to sqlite db.
You can manually update the airport codes from wikipedia with the script
create/iata_wikipedia.pl
Please report any bugs or feature requests to bug-geo-iata@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-geo-iata@rt.cpan.org
GEO::ICOA # somehow slow, handles only icoa codes http://www.nagilum.net/irssi-iata/ # embedded in irssi
Joerg Meltzer <joerg <at> joergmeltzer.de>
<joerg <at> joergmeltzer.de>
Copyright (c) 2009, Joerg Meltzer <joerg <at> joergmeltzer.de>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
Airport data is provided by wikipedia. http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Berlin-Schönefeld'. Assuming CP1252
To install Geo::IATA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::IATA
CPAN shell
perl -MCPAN -e shell install Geo::IATA
For more information on module installation, please visit the detailed CPAN module installation guide.