Skip to content

Commit

Permalink
[Countries] The OPTD POR file now has got the US DOT World Area Code …
Browse files Browse the repository at this point in the history
…(WAC) and the corresponding name.
  • Loading branch information
da115115 committed Mar 14, 2015
1 parent be0b0ab commit af196e9
Show file tree
Hide file tree
Showing 7 changed files with 19,102 additions and 19,000 deletions.
3 changes: 0 additions & 3 deletions opentraveldata/optd_por_diff_w_geonames.csv
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ WKI- A^ 495^0.00000000000000000000^ 0
IAQ-CA^ 491^0.00000000000000000000^ 0
TJH- A^ 485^0.00000000000000000000^ 0
RSX-CA^ 478^0.00000000000000000000^ 0
PLE- A^ 471^0.00000000000000000000^ 0
BEK-CA^ 469^0.00000000000000000000^ 0
MON- C^ 467^0.00000000000000000000^ 0
BOL- A^ 466^0.00000000000000000000^ 0
Expand Down Expand Up @@ -226,7 +225,6 @@ XOE- O^ 85^0.00000000000000000000^ 0
PSY-CA^ 84^0.00000000000000000000^ 0
VIH-CA^ 84^0.00000000000000000000^ 0
JAT-CA^ 83^0.00000000000000000000^ 0
LPN- A^ 83^0.00000000000000000000^ 0
OXD- A^ 83^0.00000000000000000000^ 0
XWO-CR^ 83^0.00000000000000000000^ 0
LCO-CA^ 81^0.00000000000000000000^ 0
Expand Down Expand Up @@ -526,7 +524,6 @@ UMI-CA^ 14^0.00000000000000000000^ 0
UTG- A^ 14^0.00000000000000000000^ 0
WRW-CA^ 14^0.00000000000000000000^ 0
XTR-CA^ 14^0.00000000000000000000^ 0
ZXB- O^ 14^0.00000000000000000000^ 0
ARX-CA^ 13^0.00000000000000000000^ 0
AUZ-CA^ 13^0.00000000000000000000^ 0
AXV- A^ 13^0.00000000000000000000^ 0
Expand Down
1,014 changes: 507 additions & 507 deletions opentraveldata/optd_por_no_longer_valid.csv

Large diffs are not rendered by default.

36,036 changes: 18,018 additions & 18,018 deletions opentraveldata/optd_por_public.csv

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions tools/add_city_name.awk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# * the second time to write the corresponding fields in that very same
# optd_por_public.csv file, which is therefore amended.
#
# As of June 2013 (see also the "Fields" part in the BEGIN{} section):
# As of March 2015 (see also the "Fields" part in the BEGIN{} section):
# * The POR IATA code is the field #1
# * The POR Geonames ID is the field #5
# * The POR UTF8 name is the field #7
Expand All @@ -16,7 +16,7 @@
# * The (list of) city UTF8 name(s) is the field #38
# * The (list of) city ASCII name(s) is the field #39
# * The list of travel-related POR IATA codes is the field #40
# * The location type is the field #42
# * The location type is the field #44
#
# * Samples of relevant input POR entries, as manually curated
# in the optd_por_best_known_so_far.csv data file:
Expand Down Expand Up @@ -66,7 +66,7 @@ BEGIN {
K_CTY_UTF_LST = 38
K_CTY_ASC_LST = 39
K_TVL_LST = 40
K_LOC_TYP = 42
K_LOC_TYP = 44

# Separators
K_1ST_SEP = "^"
Expand Down Expand Up @@ -256,13 +256,13 @@ function writeTravelPORList(porIataCode, porLocType, porIataCodeServedList) {

##
# Sample input and output lines:
# iata_code^icao_code^faa_code^is_geonames^geoname_id^valid_id^name^asciiname^latitude^longitude^fclass^fcode^page_rank^date_from^date_until^comment^country_code^cc2^country_name^continent_name^adm1_code^adm1_name_utf^adm1_name_ascii^adm2_code^adm2_name_utf^adm2_name_ascii^adm3_code^adm4_code^population^elevation^gtopo30^timezone^gmt_offset^dst_offset^raw_offset^moddate^city_code^city_name_utf^city_name_ascii^tvl_por_list^state_code^location_type^wiki_link^alt_name_section
# iata_code^icao_code^faa_code^is_geonames^geoname_id^valid_id^name^asciiname^latitude^longitude^fclass^fcode^page_rank^date_from^date_until^comment^country_code^cc2^country_name^continent_name^adm1_code^adm1_name_utf^adm1_name_ascii^adm2_code^adm2_name_utf^adm2_name_ascii^adm3_code^adm4_code^population^elevation^gtopo30^timezone^gmt_offset^dst_offset^raw_offset^moddate^city_code^city_name_utf^city_name_ascii^tvl_por_list^state_code^wac^wac_name^location_type^wiki_link^alt_name_section
#
# IEV^UKKK^^Y^6300960^^Kyiv Zhuliany International Airport^Kyiv Zhuliany International Airport^50.401694^30.449697^S^AIRP^0.0240196752049^^^^UA^^Ukraine^Europe^^^^^^^^^0^178^174^Europe/Kiev^2.0^3.0^2.0^2012-06-03^IEV^^^^^A^http://en.wikipedia.org/wiki/Kyiv_Zhuliany_International_Airport^en|Kyiv Zhuliany International Airport|=en|Kyiv International Airport|=en|Kyiv Airport|s=en|Kiev International Airport|=uk|Міжнародний аеропорт «Київ» (Жуляни)|=ru|Аэропорт «Киев» (Жуляны)|=ru|Международный аеропорт «Киев» (Жуляни)|
# IEV^UKKK^^Y^6300960^^Kyiv Zhuliany International Airport^Kyiv Zhuliany International Airport^50.401694^30.449697^S^AIRP^0.0240196752049^^^^UA^^Ukraine^Europe^^^^^^^^^0^178^174^Europe/Kiev^2.0^3.0^2.0^2012-06-03^IEV^^^^^488^UkraineA^http://en.wikipedia.org/wiki/Kyiv_Zhuliany_International_Airport^en|Kyiv Zhuliany International Airport|=en|Kyiv International Airport|=en|Kyiv Airport|s=en|Kiev International Airport|=uk|Міжнародний аеропорт «Київ» (Жуляни)|=ru|Аэропорт «Киев» (Жуляны)|=ru|Международный аеропорт «Киев» (Жуляни)|
#
# NCE^LFMN^^Y^6299418^^Nice Côte d'Azur International Airport^Nice Cote d'Azur International Airport^43.658411^7.215872^S^AIRP^0.157408761216^^^^FR^^France^Europe^B8^Provence-Alpes-Côte d'Azur^Provence-Alpes-Cote d'Azur^06^Département des Alpes-Maritimes^Departement des Alpes-Maritimes^062^06088^0^3^-9999^Europe/Paris^1.0^2.0^1.0^2012-06-30^NCE^^^^^CA^http://en.wikipedia.org/wiki/Nice_C%C3%B4te_d%27Azur_Airport^de|Flughafen Nizza|=en|Nice Côte d'Azur International Airport|=es|Niza Aeropuerto|ps=fr|Aéroport de Nice Côte d'Azur|=en|Nice Airport|s
# NCE^LFMN^^Y^6299418^^Nice Côte d'Azur International Airport^Nice Cote d'Azur International Airport^43.658411^7.215872^S^AIRP^0.157408761216^^^^FR^^France^Europe^B8^Provence-Alpes-Côte d'Azur^Provence-Alpes-Cote d'Azur^06^Département des Alpes-Maritimes^Departement des Alpes-Maritimes^062^06088^0^3^-9999^Europe/Paris^1.0^2.0^1.0^2012-06-30^NCE^^^^^427^FranceCA^http://en.wikipedia.org/wiki/Nice_C%C3%B4te_d%27Azur_Airport^de|Flughafen Nizza|=en|Nice Côte d'Azur International Airport|=es|Niza Aeropuerto|ps=fr|Aéroport de Nice Côte d'Azur|=en|Nice Airport|s
#
# RDU^KRDU^^Y^4487056^^Raleigh-Durham International Airport^Raleigh-Durham International Airport^35.87946^-78.7871^S^AIRP^0.0818187017848^^^^US^^United States^North America^NC^North Carolina^North Carolina^183^Wake County^Wake County^^^0^126^124^America/New_York^-5.0^-4.0^-5.0^2011-12-11^RDU|C|4464368=RDU|C|4487042^Durham=Raleigh^Durham=Raleigh^^NC^A^http://en.wikipedia.org/wiki/Raleigh%E2%80%93Durham_International_Airport^
# RDU^KRDU^^Y^4487056^^Raleigh-Durham International Airport^Raleigh-Durham International Airport^35.87946^-78.7871^S^AIRP^0.0818187017848^^^^US^^United States^North America^NC^North Carolina^North Carolina^183^Wake County^Wake County^^^0^126^124^America/New_York^-5.0^-4.0^-5.0^2011-12-11^RDU|C|4464368=RDU|C|4487042^Durham=Raleigh^Durham=Raleigh^^NC^1^United States^A^http://en.wikipedia.org/wiki/Raleigh%E2%80%93Durham_International_Airport^
#
/^([A-Z0-9]{3})\^([A-Z0-9]{0,4})\^([A-Z0-9]{0,4})\^/{

Expand All @@ -289,7 +289,8 @@ function writeTravelPORList(porIataCode, porLocType, porIataCodeServedList) {
location_type = $K_LOC_TYP

# Store the POR names for the POR IATA code
extractAndStoreCityNames(iata_code, location_type, geoname_id, name_utf, name_ascii)
extractAndStoreCityNames(iata_code, location_type, geoname_id, \
name_utf, name_ascii)

# Collect the travel-related POR IATA code
collectTravelPoints(iata_code, served_city_code_list, location_type)
Expand Down
6 changes: 3 additions & 3 deletions tools/add_noiata_por.awk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# See also the make_optd_por_public.awk AWK script for details on the format.
#
# Sample output lines:
# IEV^UKKK^^Y^6300960^^Kyiv Zhuliany International Airport^Kyiv Zhuliany International Airport^50.401694^30.449697^S^AIRP^0.0240196752049^^^^UA^^Ukraine^Europe^^^^^^^^^0^178^174^Europe/Kiev^2.0^3.0^2.0^2012-06-03^IEV^^^^^A^http://en.wikipedia.org/wiki/Kyiv_Zhuliany_International_Airport^en|Kyiv Zhuliany International Airport|=en|Kyiv International Airport|=en|Kyiv Airport|s=en|Kiev International Airport|=uk|Міжнародний аеропорт «Київ» (Жуляни)|=ru|Аэропорт «Киев» (Жуляны)|=ru|Международный аеропорт «Киев» (Жуляни)|
# NCE^LFMN^^Y^6299418^^Nice Côte d'Azur International Airport^Nice Cote d'Azur International Airport^43.658411^7.215872^S^AIRP^0.157408761216^^^^FR^^France^Europe^B8^Provence-Alpes-Côte d'Azur^Provence-Alpes-Cote d'Azur^06^Département des Alpes-Maritimes^Departement des Alpes-Maritimes^062^06088^0^3^-9999^Europe/Paris^1.0^2.0^1.0^2012-06-30^NCE^^^^^CA^http://en.wikipedia.org/wiki/Nice_C%C3%B4te_d%27Azur_Airport^de|Flughafen Nizza|=en|Nice Côte d'Azur International Airport|=es|Niza Aeropuerto|ps=fr|Aéroport de Nice Côte d'Azur|=en|Nice Airport|s
# IEV^UKKK^^Y^6300960^^Kyiv Zhuliany International Airport^Kyiv Zhuliany International Airport^50.401694^30.449697^S^AIRP^0.0240196752049^^^^UA^^Ukraine^Europe^^^^^^^^^0^178^174^Europe/Kiev^2.0^3.0^2.0^2012-06-03^IEV^^^^^488^UkraineA^http://en.wikipedia.org/wiki/Kyiv_Zhuliany_International_Airport^en|Kyiv Zhuliany International Airport|=en|Kyiv International Airport|=en|Kyiv Airport|s=en|Kiev International Airport|=uk|Міжнародний аеропорт «Київ» (Жуляни)|=ru|Аэропорт «Киев» (Жуляны)|=ru|Международный аеропорт «Киев» (Жуляни)|
# NCE^LFMN^^Y^6299418^^Nice Côte d'Azur International Airport^Nice Cote d'Azur International Airport^43.658411^7.215872^S^AIRP^0.157408761216^^^^FR^^France^Europe^B8^Provence-Alpes-Côte d'Azur^Provence-Alpes-Cote d'Azur^06^Département des Alpes-Maritimes^Departement des Alpes-Maritimes^062^06088^0^3^-9999^Europe/Paris^1.0^2.0^1.0^2012-06-30^NCE^^^^^427^FranceCA^http://en.wikipedia.org/wiki/Nice_C%C3%B4te_d%27Azur_Airport^de|Flughafen Nizza|=en|Nice Côte d'Azur International Airport|=es|Niza Aeropuerto|ps=fr|Aéroport de Nice Côte d'Azur|=en|Nice Airport|s
# UNS^ZZZZ^^Y^8298981^1^Umnak Island Airport^Umnak Island Airport^53.38277^-167.88946^S^AIRP^^^1948-01-01^Air base closed after WWII, in 1947^US^^United States^North America^^^^^^^^^^^^America/USA^^^^-1^UMB^Umnak Island^UMB|5877180|Umnak Island|Umnak Island^^AK^A^http://en.wikipedia.org/wiki/Cape_Field_at_Fort_Glenn^
#

Expand Down Expand Up @@ -39,7 +39,7 @@ BEGIN {
#
/^([A-Z]{3})\^([A-Z]{4}|)\^([0-9A-Z]{3,4}|)\^(Y|N)\^([0-9]{1,10})\^([0-9]{1,10}|)\^/ {

if (NF == 44) {
if (NF == 46) {
print ($0)

} else {
Expand Down
Loading

0 comments on commit af196e9

Please sign in to comment.