Country code

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Country code
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Baso Minangkabau · bosanski · brezhoneg · català · čeština · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

ISO 3166-1

ISO 3166-1 defines codes for the names of countries, dependent territories, and special areas of geographical interest.

Typically used on boundary relation in combination with boundary=administrative + admin_level=2 tags.

Key Description Example
ISO3166-1:alpha2 Two-letter country codes which are the most widely used of the three, and used most prominently for the Internet's country code top-level domains (with a few exceptions) RU
ISO3166-1:alpha3 Three-letter country codes which allow a better visual association between the codes and the country names than the alpha-2 codes RUS

The alpha2 codes (always in capitals in OpenStreetmap) are also used in some tags as subkeys for adding specialized values for specific countries, such as Key:phone#Support for multiple countries.

They are also used as prefixes of keys for tagging features that are specific to countries (e.g. the national classification of schools in France are prefixed by "FR:") or as prefixes of tag values which are only meaningful in a specific country (for example the classification by type of some subnational territorial entities, when the hierarchical admin_level are not sufficient to describe them correctly).

ISO 3166-2

ISO 3166-2 defines codes for the names of the principal subdivisions (e.g., provinces or states).

Typically used on boundary relation in combination with boundary=administrative tags, but value of admin_level=* (3 or above in OpenStreetMap) depends on the country.

Key Description Example
ISO3166-2 ISO 3166-2 code consists of two parts, separated by a hyphen:
  • The first part is the ISO 3166-1 alpha-2 code of the country
  • The second part is a string of up to three alphanumeric characters, which is usually obtained from national sources and stems from coding systems already in use in the country concerned, but may also be developed by the ISO itself.

Other codes

There are about 200 states and territories, among which 194 are full UN members, internationally recognized as independant states.

United Nations M.49
The UN M.49 standard extends the set of country codes with 3-digit region codes. Some of them, covering international areas, are integrated in other standards (notably by IETF BCP 47 in its associated IANA database, as region subtags for use in locale tags, after the initial subtag defined for a language code or the code of a group of languages). UN M.49 numeric codes defined for individual countries and territories are also part of the ISO 3166-1 code as an alternative to their 2-letter codes (but they must not be used in BCP 47 locale tags, or as country codes in OpenStreetMap feature tags: use only alphabetic codes from ISO 3166-1 or its extensions with ISO 3166-2 subnational division codes).
United Nations LOCODE
The first two-letter code, extracted from the list of five-characters LOCODE is identical to the two-letter code from the ISO 3166-1 standard. These codes are then given a descriptive name of the territory. The remaining 3 letters are used for a specific location in that country. Some locations have a 5-letter LOCODE code but no specific code in ISO 3166-2 (the reverse is also true, notably in Antarctica where only ISO3166-1 codes are defined for all undivided subareas: some countries or regions may still define their own national standard for those areas, and will use specific tags for them, for example the French INSEE or the European Union, preferably by prefixing these specific tags with their ISO3166-1 code such as "FR:" or "EU:" followed by the standard body and some extension for their specific standard).
Universal Postal Union (UPU)
The Universal Postal Union standard body defines codes for countries or territories that are sometimes different from ISO 3166-1: some countries have a 1-letter code which is still preferred on postal addresses (before the national postal code or zip code). However worldwide postal organisations are now also accepting the alpha2 codes from ISO 3166-1, and even recommend it in Europe, instead of older shorter codes initially designed for road vehicles (and in some countries they are even preferred now for automated processing by OCR systems). Postal services of origin countries that are not massively equipped with automated systems still prefer the explicit indication of the country name at end of addresses (preferably in the Latin script and in capitals, or alternatively in an official script of the origin area of posted mails). Using ISO 3166-1 alpha2 codes (with an hyphen before the postal code in the target country) saves one line of address.
International Telecommunication Union (ITU) and the E.164 standard
The ITU-T standard E.164 is used for the international phone plans, and references the country calling codes. Some countries are sharing the same country calling code (such as those in the NAPN numbering plan), and others are using multiple country codes for some of their remote areas, even if they may also be called domestically within the same national numbering plan without using them via an international phone call (with the international selection prefix normally represented by a standard "+" in the recommended E.164 format and in OpenStreetMap. See also Key:phone in OpenStreetMap.
There's also the ITU prefix for call signs, also used now as the source code for prefixes in aircraft registration number. The ITU also defines other codes for regional identification of various communication operators in its GLAD database, including for the aerial and maritime navigation and related equipements and systems.
Identification of vehicles and transport regulation
The identification of road vehicles travelling abroad requires displaying a plate or sign showing another country code which may also be different from the ISO 3166-1 standard (e.g. "F" for France, "I" for Italy). Those codes are also displayed on mandatory driver licences and insurance documents.
The IATA also uses its own code for identifying registered aircrafts with a 1-or-2-character code (letters or digits) used as a prefix before an hyphen and the registration number in that country (IATA and OCAI also define 3-codes for airports, airlines...)
Maritime registries also have their own separate code for identifying naval ships (with a codification of harbors of registration). These codes are also still used for the identification of fixed maritime equipments in their associated maritime region (but maritime telecommunication systems use ITU call signs prefixes and their related GLAD codes).
See also: FIPS
The FIPS-10 code is now deprecated (its defining US standard has been withdrawn and should no longer be used). It is given a name oriented towards an American description of the territory. The name following it is written (between parentheses) when it is not associated to an fully independent country, member of the United Nations.
The FIPS-10-4 code however is still used (with some extensions) by NATO, but is progressively migrated to the ISO 3166 standard.