Add:Core:Added all country definitions, changed country id to ISO 3166 numeric
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 17 Feb 2008 12:02:24 +0000 (12:02 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 17 Feb 2008 12:02:24 +0000 (12:02 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@873 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/country.c
navit/src/data/mg/map.c
navit/src/data/mg/mg.h
navit/src/data/mg/street.c

index d764e4a..5a04e3d 100644 (file)
@@ -21,68 +21,252 @@ struct country {
 #define _n(STRING)    gettext_noop(STRING)
 
 struct country country[]= {
-       { 1 ,"CZ",      "CZ",   "CZE",  _n("Czech Republic")},
-       { 2 ,"SK",      "SK",   "SVK",  _n("Slovakia")},
-       { 7 ,"RSM",     "SM",   "SMR",  _n("San Marino")},
-       {11 ,"EST",     "EE",   "EST",  _n("Estonia")},
-       {12 ,"GE",      "GE",   "GEO",  _n("Georgia")},
-       {13 ,"LV",      "LV",   "LVA",  _n("Latvia")},
-       {14 ,"LT",      "LT",   "LTU",  _n("Lithuania")},
-       {15 ,"MD",      "MD",   "MDA",  _n("Moldova")},
-       {16 ,"RUS",     "RU",   "RUS",  _n("Russian Federation")},
-       {17 ,"UA",      "UA",   "UKR",  _n("Ukraine")},
-       {18 ,"BY",      "BY",   "BLR",  _n("Belarus")},
-       {20 ,"ET",      "EG",   "EGY",  _n("Egypt")},
-       {30 ,"GR",      "GR",   "GRC",  _n("Greece")},
-       {31 ,"NL",      "NL",   "NLD",  _n("Netherlands")},
-       {32 ,"B",       "BE",   "BEL",  _n("Belgium")},
-       {33 ,"F",       "FR",   "FRA",  _n("France")},
-       {34 ,"E",       "ES",   "ESP",  _n("Spain")},
-       {36 ,"H",       "HU",   "HUN",  _n("Hungary")},
-       {39 ,"I",       "IT",   "ITA",  _n("Italy")},
-       {40 ,"RO",      "RO",   "ROM",  _n("Romania")},
-       {41 ,"CH",      "CH",   "CHE",  _n("Switzerland")},
-       {43 ,"A",       "AT",   "AUT",  _n("Austria")},
-       {44 ,"GB",      "GB",   "GBR",  _n("United Kingdom")},
-       {45 ,"DK",      "DK",   "DNK",  _n("Denmark")},
-       {46 ,"S",       "SE",   "SWE",  _n("Sweden")},
-       {47 ,"N",       "NO",   "NOR",  _n("Norway")},
-       {48 ,"PL",      "PL",   "POL",  _n("Poland")},
-       {49 ,"D",       "DE",   "DEU",  _n("Germany")},
-       {50 ,"GBZ",     "GI",   "GIB",  _n("Gibraltar")},
-       {51 ,"P",       "PT",   "PRT",  _n("Portugal")},
-       {52 ,"L",       "LU",   "LUX",  _n("Luxembourg")},
-       {53 ,"IRL",     "IE",   "IRL",  _n("Ireland")},
-       {54 ,"IS",      "IS",   "ISL",  _n("Iceland")},
-       {55 ,"AL",      "AL",   "ALB",  _n("Albania")},
-       {56 ,"M",       "MT",   "MLT",  _n("Malta")},
-       {57 ,"CY",      "CY",   "CYP",  _n("Cyprus")},
-       {58 ,"FIN",     "FI",   "FIN",  _n("Finland")},
-       {59 ,"BG",      "BG",   "BGR",  _n("Bulgaria")},
-       {61 ,"RL",      "LB",   "LBN",  _n("Lebanon")},
-       {62 ,"AND",     "AD",   "AND",  _n("Andorra")},
-       {63 ,"SYR",     "SY",   "SYR",  _n("Syria")},
-       {66 ,"KSA",     "SA",   "SAU",  _n("Saudi Arabia")},
-       {71 ,"LAR",     "LY",   "LYB",  _n("Libia")},
-       {72 ,"IL",      "IL",   "ISR",  _n("Israel")},
-       {73 ,"AUT",     "PS",   "PSE",  _n("Palestinia")},
-       {75 ,"FL",      "LI",   "LIE",  _n("Liechtenstein")},
-       {76 ,"MA",      "MA",   "MAR",  _n("Morocco")},
-       {77 ,"DZ",      "DZ",   "DZA",  _n("Algeria")},
-       {78 ,"TN",      "TN",   "TUN",  _n("Tunisia")},
-       {81 ,"SRB",     "RS",   "SRB",  _n("Serbia")},
-       {83 ,"HKJ",     "JO",   "JOR",  _n("Jordan")},
-       {85 ,"NDH",     "HR",   "HRV",  _n("Croatia")},
-       {86 ,"SLO",     "SI",   "SVN",  _n("Slovenia")},
-       {87 ,"BIH",     "BA",   "BIH",  _n("Bosnia and Herzegovina")},
-       {89 ,"MK",      "MK",   "MKD",  _n("Macedonia")},
-       {90 ,"TR",      "TR",   "TUR",  _n("Turkey")},
-       {93 ,"MC",      "MC",   "MCO",  _n("Monaco")},
-       {94 ,"AZ",      "AZ",   "AZE",  _n("Azerbaijan")},
-       {95 ,"ARM",     "AM",   "ARM",  _n("Armenia")},
-       {98 ,"FO",      "FO",   "FRO",  _n("Faroe Islands")},
-       {99 ,"WSA",     "EH",   "ESH",  _n("Western Sahara")},
-       {336 ,NULL,     "SJ",   "SJM",  _n("Svalbard and Jan Mayen")},
+  { 20,        "AND",  "AD", "AND", _n("Andorra")},
+  {784,        "UAE",  "AE", "ARE", _n("United Arab Emirates")},
+  {  4,        "AFG",  "AF", "AFG", _n("Afghanistan")},
+  { 28,        "AG",   "AG", "ATG", _n("Antigua and Barbuda")},
+  {660,        NULL,   "AI", "AIA", _n("Anguilla")},
+  {  8,        "AL",   "AL", "ALB", _n("Albania")},
+  { 51,        "ARM",  "AM", "ARM", _n("Armenia")},
+  {530,        "NA",   "AN", "ANT", _n("Netherlands Antilles")},
+  { 24,        "ANG",  "AO", "AGO", _n("Angola")},
+  { 10,        NULL,   "AQ", "ATA", _n("Antarctica")},
+  { 32,        "RA",   "AR", "ARG", _n("Argentina")},
+  { 16,        NULL,   "AS", "ASM", _n("American Samoa")},
+  { 40,        "A",    "AT", "AUT", _n("Austria")},
+  { 36,        "AUS",  "AU", "AUS", _n("Australia")},
+  {533,        "ARU",  "AW", "ABW", _n("Aruba")},
+  {248,        "AX",   "AX", "ALA", _n("Aland Islands")},
+  { 31,        "AZ",   "AZ", "AZE", _n("Azerbaijan")},
+  { 70,        "BiH",  "BA", "BIH", _n("Bosnia and Herzegovina")},
+  { 52,        "BDS",  "BB", "BRB", _n("Barbados")},
+  { 50,        "BD",   "BD", "BGD", _n("Bangladesh")},
+  { 56,        "B",    "BE", "BEL", _n("Belgium")},
+  {854,        "BF",   "BF", "BFA", _n("Burkina Faso")},
+  {100,        "BG",   "BG", "BGR", _n("Bulgaria")},
+  { 48,        "BRN",  "BH", "BHR", _n("Bahrain")},
+  {108,        "RU",   "BI", "BDI", _n("Burundi")},
+  {204,        "BJ",   "BJ", "BEN", _n("Benin")},
+  {652,        NULL,   "BL", "BLM", _n("Saint Barthelemy")},
+  { 60,        NULL,   "BM", "BMU", _n("Bermuda")},
+  { 96,        "BRU",  "BN", "BRN", _n("Brunei Darussalam")},
+  { 68,        "BOL",  "BO", "BOL", _n("Bolivia")},
+  { 76,        "BR",   "BR", "BRA", _n("Brazil")},
+  { 44,        "BS",   "BS", "BHS", _n("Bahamas")},
+  { 64,        "BHT",  "BT", "BTN", _n("Bhutan")},
+  { 74,        NULL,   "BV", "BVT", _n("Bouvet Island")},
+  { 72,        "RB",   "BW", "BWA", _n("Botswana")},
+  {112,        "BY",   "BY", "BLR", _n("Belarus")},
+  { 84,        "BZ",   "BZ", "BLZ", _n("Belize")},
+  {124,        "CDN",  "CA", "CAN", _n("Canada")},
+  {166,        NULL,   "CC", "CCK", _n("Cocos (Keeling) Islands")},
+  {180,        "CGO",  "CD", "COD", _n("Congo, Democratic Republic of the")},
+  {140,        "RCA",  "CF", "CAF", _n("Central African Republic")},
+  {178,        NULL,   "CG", "COG", _n("Congo")},
+  {756,        "CH",   "CH", "CHE", _n("Switzerland")},
+  {384,        "CI",   "CI", "CIV", _n("Cote d'Ivoire")},
+  {184,        NULL,   "CK", "COK", _n("Cook Islands")},
+  {152,        "RCH",  "CL", "CHL", _n("Chile")},
+  {120,        "CAM",  "CM", "CMR", _n("Cameroon")},
+  {156,        "RC",   "CN", "CHN", _n("China")},
+  {170,        "CO",   "CO", "COL", _n("Colombia")},
+  {188,        "CR",   "CR", "CRI", _n("Costa Rica")},
+  {192,        "C",    "CU", "CUB", _n("Cuba")},
+  {132,        "CV",   "CV", "CPV", _n("Cape Verde")},
+  {162,        NULL,   "CX", "CXR", _n("Christmas Island")},
+  {196,        "CY",   "CY", "CYP", _n("Cyprus")},
+  {203,        "CZ",   "CZ", "CZE", _n("Czech Republic")},
+  {276,        "D",    "DE", "DEU", _n("Germany")},
+  {262,        "DJI",  "DJ", "DJI", _n("Djibouti")},
+  {208,        "DK",   "DK", "DNK", _n("Denmark")},
+  {212,        "WD",   "DM", "DMA", _n("Dominica")},
+  {214,        "DOM",  "DO", "DOM", _n("Dominican Republic")},
+  { 12,        "DZ",   "DZ", "DZA", _n("Algeria")},
+  {218,        "EC",   "EC", "ECU", _n("Ecuador")},
+  {233,        "EST",  "EE", "EST", _n("Estonia")},
+  {818,        "ET",   "EG", "EGY", _n("Egypt")},
+  {732,        "WSA",  "EH", "ESH", _n("Western Sahara")},
+  {232,        "ER",   "ER", "ERI", _n("Eritrea")},
+  {724,        "E",    "ES", "ESP", _n("Spain")},
+  {231,        "ETH",  "ET", "ETH", _n("Ethiopia")},
+  {246,        "FIN",  "FI", "FIN", _n("Finland")},
+  {242,        "FJI",  "FJ", "FJI", _n("Fiji")},
+  {238,        NULL,   "FK", "FLK", _n("Falkland Islands (Malvinas)")},
+  {583,        "FSM",  "FM", "FSM", _n("Micronesia, Federated States of")},
+  {234,        "FO",   "FO", "FRO", _n("Faroe Islands")},
+  {250,        "F",    "FR", "FRA", _n("France")},
+  {266,        "G",    "GA", "GAB", _n("Gabon")},
+  {826,        "GB",   "GB", "GBR", _n("United Kingdom")},
+  {308,        "WG",   "GD", "GRD", _n("Grenada")},
+  {268,        "GE",   "GE", "GEO", _n("Georgia")},
+  {254,        NULL,   "GF", "GUF", _n("French Guiana")},
+  {831,        NULL,   "GG", "GGY", _n("Guernsey")},
+  {288,        "GH",   "GH", "GHA", _n("Ghana")},
+  {292,        "GBZ",  "GI", "GIB", _n("Gibraltar")},
+  {304,        "KN",   "GL", "GRL", _n("Greenland")},
+  {270,        "WAG",  "GM", "GMB", _n("Gambia")},
+  {324,        "RG",   "GN", "GIN", _n("Guinea")},
+  {312,        NULL,   "GP", "GLP", _n("Guadeloupe")},
+  {226,        "GQ",   "GQ", "GNQ", _n("Equatorial Guinea")},
+  {300,        "GR",   "GR", "GRC", _n("Greece")},
+  {239,        NULL,   "GS", "SGS", _n("South Georgia and the South Sandwich Islands")},
+  {320,        "GCA",  "GT", "GTM", _n("Guatemala")},
+  {316,        NULL,   "GU", "GUM", _n("Guam")},
+  {624,        "GUB",  "GW", "GNB", _n("Guinea-Bissau")},
+  {328,        "GUY",  "GY", "GUY", _n("Guyana")},
+  {344,        "HK",   "HK", "HKG", _n("Hong Kong")},
+  {334,        NULL,   "HM", "HMD", _n("Heard Island and McDonald Islands")},
+  {340,        "HN",   "HN", "HND", _n("Honduras")},
+  {191,        "HR",   "HR", "HRV", _n("Croatia")},
+  {332,        "RH",   "HT", "HTI", _n("Haiti")},
+  {348,        "H",    "HU", "HUN", _n("Hungary")},
+  {360,        "RI",   "ID", "IDN", _n("Indonesia")},
+  {372,        "IRL",  "IE", "IRL", _n("Ireland")},
+  {376,        "IL",   "IL", "ISR", _n("Israel")},
+  {833,        NULL,   "IM", "IMN", _n("Isle of Man")},
+  {356,        "IND",  "IN", "IND", _n("India")},
+  { 86,        NULL,   "IO", "IOT", _n("British Indian Ocean Territory")},
+  {368,        "IRQ",  "IQ", "IRQ", _n("Iraq")},
+  {364,        "IR",   "IR", "IRN", _n("Iran, Islamic Republic of")},
+  {352,        "IS",   "IS", "ISL", _n("Iceland")},
+  {380,        "I",    "IT", "ITA", _n("Italy")},
+  {832,        NULL,   "JE", "JEY", _n("Jersey")},
+  {388,        "JA",   "JM", "JAM", _n("Jamaica")},
+  {400,        "JOR",  "JO", "JOR", _n("Jordan")},
+  {392,        "J",    "JP", "JPN", _n("Japan")},
+  {404,        "EAK",  "KE", "KEN", _n("Kenya")},
+  {417,        "KS",   "KG", "KGZ", _n("Kyrgyzstan")},
+  {116,        "K",    "KH", "KHM", _n("Cambodia")},
+  {296,        "KIR",  "KI", "KIR", _n("Kiribati")},
+  {174,        "COM",  "KM", "COM", _n("Comoros")},
+  {659,        "KAN",  "KN", "KNA", _n("Saint Kitts and Nevis")},
+  {408,        "KP",   "KP", "PRK", _n("Korea, Democratic People's Republic of")},
+  {410,        "ROK",  "KR", "KOR", _n("Korea, Republic of")},
+  {414,        "KWT",  "KW", "KWT", _n("Kuwait")},
+  {136,        NULL,   "KY", "CYM", _n("Cayman Islands")},
+  {398,        "KZ",   "KZ", "KAZ", _n("Kazakhstan")},
+  {418,        "LAO",  "LA", "LAO", _n("Lao People's Democratic Republic")},
+  {422,        "RL",   "LB", "LBN", _n("Lebanon")},
+  {662,        "WL",   "LC", "LCA", _n("Saint Lucia")},
+  {438,        "FL",   "LI", "LIE", _n("Liechtenstein")},
+  {144,        "CL",   "LK", "LKA", _n("Sri Lanka")},
+  {430,        "LB",   "LR", "LBR", _n("Liberia")},
+  {426,        "LS",   "LS", "LSO", _n("Lesotho")},
+  {440,        "LT",   "LT", "LTU", _n("Lithuania")},
+  {442,        "L",    "LU", "LUX", _n("Luxembourg")},
+  {428,        "LV",   "LV", "LVA", _n("Latvia")},
+  {434,        "LAR",  "LY", "LBY", _n("Libyan Arab Jamahiriya")},
+  {504,        "MA",   "MA", "MAR", _n("Morocco")},
+  {492,        "MC",   "MC", "MCO", _n("Monaco")},
+  {498,        "MD",   "MD", "MDA", _n("Moldova, Republic of")},
+  {499,        "MNE",  "ME", "MNE", _n("Montenegro")},
+  {663,        NULL,   "MF", "MAF", _n("Saint Martin (French part)")},
+  {450,        "RM",   "MG", "MDG", _n("Madagascar")},
+  {584,        "MH",   "MH", "MHL", _n("Marshall Islands")},
+  {807,        "MK",   "MK", "MKD", _n("Macedonia, the former Yugoslav Republic of")},
+  {466,        "RMM",  "ML", "MLI", _n("Mali")},
+  {104,        "MYA",  "MM", "MMR", _n("Myanmar")},
+  {496,        "MGL",  "MN", "MNG", _n("Mongolia")},
+  {446,        NULL,   "MO", "MAC", _n("Macao")},
+  {580,        NULL,   "MP", "MNP", _n("Northern Mariana Islands")},
+  {474,        NULL,   "MQ", "MTQ", _n("Martinique")},
+  {478,        "RIM",  "MR", "MRT", _n("Mauritania")},
+  {500,        NULL,   "MS", "MSR", _n("Montserrat")},
+  {470,        "M",    "MT", "MLT", _n("Malta")},
+  {480,        "MS",   "MU", "MUS", _n("Mauritius")},
+  {462,        "MV",   "MV", "MDV", _n("Maldives")},
+  {454,        "MW",   "MW", "MWI", _n("Malawi")},
+  {484,        "MEX",  "MX", "MEX", _n("Mexico")},
+  {458,        "MAL",  "MY", "MYS", _n("Malaysia")},
+  {508,        "MOC",  "MZ", "MOZ", _n("Mozambique")},
+  {516,        "NAM",  "NA", "NAM", _n("Namibia")},
+  {540,        "NCL",  "NC", "NCL", _n("New Caledonia")},
+  {562,        "RN",   "NE", "NER", _n("Niger")},
+  {574,        NULL,   "NF", "NFK", _n("Norfolk Island")},
+  {566,        "NGR",  "NG", "NGA", _n("Nigeria")},
+  {558,        "NIC",  "NI", "NIC", _n("Nicaragua")},
+  {528,        "NL",   "NL", "NLD", _n("Netherlands")},
+  {578,        "N",    "NO", "NOR", _n("Norway")},
+  {524,        "NEP",  "NP", "NPL", _n("Nepal")},
+  {520,        "NAU",  "NR", "NRU", _n("Nauru")},
+  {570,        NULL,   "NU", "NIU", _n("Niue")},
+  {554,        "NZ",   "NZ", "NZL", _n("New Zealand")},
+  {512,        "OM",   "OM", "OMN", _n("Oman")},
+  {591,        "PA",   "PA", "PAN", _n("Panama")},
+  {604,        "PE",   "PE", "PER", _n("Peru")},
+  {258,        NULL,   "PF", "PYF", _n("French Polynesia")},
+  {598,        "PNG",  "PG", "PNG", _n("Papua New Guinea")},
+  {608,        "RP",   "PH", "PHL", _n("Philippines")},
+  {586,        "PK",   "PK", "PAK", _n("Pakistan")},
+  {616,        "PL",   "PL", "POL", _n("Poland")},
+  {666,        NULL,   "PM", "SPM", _n("Saint Pierre and Miquelon")},
+  {612,        NULL,   "PN", "PCN", _n("Pitcairn")},
+  {630,        "PRI",  "PR", "PRI", _n("Puerto Rico")},
+  {275,        "AUT",  "PS", "PSE", _n("Palestinian Territory, Occupied")},
+  {620,        "P",    "PT", "PRT", _n("Portugal")},
+  {585,        "PAL",  "PW", "PLW", _n("Palau")},
+  {600,        "PY",   "PY", "PRY", _n("Paraguay")},
+  {634,        "Q",    "QA", "QAT", _n("Qatar")},
+  {638,        NULL,   "RE", "REU", _n("Reunion")},
+  {642,        "RO",   "RO", "ROU", _n("Romania")},
+  {688,        "SRB",  "RS", "SRB", _n("Serbia")},
+  {643,        "RUS",  "RU", "RUS", _n("Russian Federation")},
+  {646,        "RWA",  "RW", "RWA", _n("Rwanda")},
+  {682,        "KSA",  "SA", "SAU", _n("Saudi Arabia")},
+  { 90,        "SOL",  "SB", "SLB", _n("Solomon Islands")},
+  {690,        "SY",   "SC", "SYC", _n("Seychelles")},
+  {736,        "SUD",  "SD", "SDN", _n("Sudan")},
+  {752,        "S",    "SE", "SWE", _n("Sweden")},
+  {702,        "SGP",  "SG", "SGP", _n("Singapore")},
+  {654,        NULL,   "SH", "SHN", _n("Saint Helena")},
+  {705,        "SLO",  "SI", "SVN", _n("Slovenia")},
+  {744,        NULL,   "SJ", "SJM", _n("Svalbard and Jan Mayen")},
+  {703,        "SK",   "SK", "SVK", _n("Slovakia")},
+  {694,        "WAL",  "SL", "SLE", _n("Sierra Leone")},
+  {674,        "RSM",  "SM", "SMR", _n("San Marino")},
+  {686,        "SN",   "SN", "SEN", _n("Senegal")},
+  {706,        "SO",   "SO", "SOM", _n("Somalia")},
+  {740,        "SME",  "SR", "SUR", _n("Suriname")},
+  {678,        "STP",  "ST", "STP", _n("Sao Tome and Principe")},
+  {222,        "ES",   "SV", "SLV", _n("El Salvador")},
+  {760,        "SYR",  "SY", "SYR", _n("Syrian Arab Republic")},
+  {748,        "SD",   "SZ", "SWZ", _n("Swaziland")},
+  {796,        NULL,   "TC", "TCA", _n("Turks and Caicos Islands")},
+  {148,        "TD",   "TD", "TCD", _n("Chad")},
+  {260,        "ARK",  "TF", "ATF", _n("French Southern Territories")},
+  {768,        "RT",   "TG", "TGO", _n("Togo")},
+  {764,        "T",    "TH", "THA", _n("Thailand")},
+  {762,        "TJ",   "TJ", "TJK", _n("Tajikistan")},
+  {772,        NULL,   "TK", "TKL", _n("Tokelau")},
+  {626,        "TL",   "TL", "TLS", _n("Timor-Leste")},
+  {795,        "TM",   "TM", "TKM", _n("Turkmenistan")},
+  {788,        "TN",   "TN", "TUN", _n("Tunisia")},
+  {776,        "TON",  "TO", "TON", _n("Tonga")},
+  {792,        "TR",   "TR", "TUR", _n("Turkey")},
+  {780,        "TT",   "TT", "TTO", _n("Trinidad and Tobago")},
+  {798,        "TUV",  "TV", "TUV", _n("Tuvalu")},
+  {158,        NULL,   "TW", "TWN", _n("Taiwan, Province of China")},
+  {834,        "EAT",  "TZ", "TZA", _n("Tanzania, United Republic of")},
+  {804,        "UA",   "UA", "UKR", _n("Ukraine")},
+  {800,        "EAU",  "UG", "UGA", _n("Uganda")},
+  {581,        NULL,   "UM", "UMI", _n("United States Minor Outlying Islands")},
+  {840,        "USA",  "US", "USA", _n("United States")},
+  {858,        "ROU",  "UY", "URY", _n("Uruguay")},
+  {860,        "UZ",   "UZ", "UZB", _n("Uzbekistan")},
+  {336,        "SCV",  "VA", "VAT", _n("Holy See (Vatican City State)")},
+  {670,        "WV",   "VC", "VCT", _n("Saint Vincent and the Grenadines")},
+  {862,        "YV",   "VE", "VEN", _n("Venezuela")},
+  { 92,        NULL,   "VG", "VGB", _n("Virgin Islands, British")},
+  {850,        NULL,   "VI", "VIR", _n("Virgin Islands, U.S.")},
+  {704,        "VN",   "VN", "VNM", _n("Viet Nam")},
+  {548,        "VAN",  "VU", "VUT", _n("Vanuatu")},
+  {876,        NULL,   "WF", "WLF", _n("Wallis and Futuna")},
+  {882,        "WS",   "WS", "WSM", _n("Samoa")},
+  {887,        "YAR",  "YE", "YEM", _n("Yemen")},
+  {175,        NULL,   "YT", "MYT", _n("Mayotte")},
+  {710,        "ZA",   "ZA", "ZAF", _n("South Africa")},
+  {894,        "Z",    "ZM", "ZMB", _n("Zambia")},
+  {716,        "ZW",   "ZW", "ZWE", _n("Zimbabwe")},
 };
 
 
index 5a38563..820d824 100644 (file)
@@ -7,6 +7,74 @@
 #include "mg.h"
 
 
+struct country_isonum {
+       int country;
+       int isonum;
+} country_isonums[]={
+  {  1,203},
+  {  2,703},
+  {  7,674},
+  { 11,233},
+  { 12,268},
+  { 13,428},
+  { 14,440},
+  { 15,498},
+  { 16,643},
+  { 17,804},
+  { 18,112},
+  { 20,818},
+  { 30,300},
+  { 31,528},
+  { 32, 56},
+  { 33,250},
+  { 34,724},
+  { 36,348},
+  { 39,380},
+  { 40,642},
+  { 41,756},
+  { 43, 40},
+  { 44,826},
+  { 45,208},
+  { 46,752},
+  { 47,578},
+  { 48,616},
+  { 49,276},
+  { 50,292},
+  { 51,620},
+  { 52,442},
+  { 53,372},
+  { 54,352},
+  { 55,  8},
+  { 56,470},
+  { 57,196},
+  { 58,246},
+  { 59,100},
+  { 61,422},
+  { 62, 20},
+  { 63,760},
+  { 66,682},
+  { 71,434},
+  { 72,376},
+  { 73,275},
+  { 75,438},
+  { 76,504},
+  { 77, 12},
+  { 78,788},
+  { 81,688},
+  { 83,400},
+  { 85,191},
+  { 86,705},
+  { 87, 70},
+  { 89,807},
+  { 90,792},
+  { 93,492},
+  { 94, 31},
+  { 95, 51},
+  { 98,234},
+  { 99,732},
+  {336,774},
+};
+
 struct map_priv * map_new_mg(struct map_methods *meth, struct attr **attrs);
 
 static int map_id;
@@ -31,6 +99,23 @@ static char *file[]={
        [file_woodland_ply]="woodland.ply",
 };
 
+int mg_country_from_isonum(int isonum)
+{
+       int i;
+       for (i = 0 ; i < sizeof(country_isonums)/sizeof(struct country_isonum) ; i++)
+               if (country_isonums[i].isonum == isonum)
+                       return country_isonums[i].country;
+       return 0;
+}
+
+int mg_country_to_isonum(int country)
+{
+       int i;
+       for (i = 0 ; i < sizeof(country_isonums)/sizeof(struct country_isonum) ; i++)
+               if (country_isonums[i].country == country)
+                       return country_isonums[i].isonum;
+       return 0;
+}
 
 static int
 file_next(struct map_rect_priv *mr)
@@ -242,6 +327,7 @@ map_search_new_mg(struct map_priv *map, struct item *item, struct attr *search,
                tree_search_init(map->dirname, "town.b2", &mr->ts, 0x1000);
                mr->current_file=file_town_twn;
                mr->search_str=map_search_mg_convert_special(search->u.str);
+               mr->search_country=mg_country_from_isonum(item->id_lo);
                break;
        case attr_street_name:
                if (item->type != type_town_streets)
@@ -257,7 +343,6 @@ map_search_new_mg(struct map_priv *map, struct item *item, struct attr *search,
                return NULL;
        }
        mr->search_item=*item;
-       mr->search_country=item->id_lo;
        mr->search_partial=partial;
        mr->file=mr->m->file[mr->current_file];
        block_init(mr);
index ce67155..217b94b 100644 (file)
@@ -270,6 +270,9 @@ struct map_rect_priv {
        struct item_priv item3;
 };
 
+int mg_country_from_isonum(int isonum);
+int mg_country_to_isonum(int country);
+
 int block_init(struct map_rect_priv *mr);
 int block_next(struct map_rect_priv *mr);
 int block_get_byindex(struct file *file, int idx, struct block_priv *blk);
index d0b4881..457f7da 100644 (file)
@@ -269,7 +269,7 @@ street_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
                        return 0;
                if (! street->name.len)
                        street_name_get_by_id(&street->name,street->name_file,nameid);
-               attr->u.num=street->name.country;
+               attr->u.num=mg_country_to_isonum(street->name.country);
                return 1;
        case attr_debug:
                street->attr_next=attr_none;