From OpenStreetMap Wiki
Jump to navigation Jump to search

ISO 3166-1

ISO 3166-1 では国、自治領、地理上の関心となる特殊なエリアの名前に対するコードを定義しています。

通常は、 boundary=administrative + admin_level=2 タグの組み合わせで boundary リレーションが使われます。

キー 説明
ISO3166-1:alpha2 2文字の国コードで、3種類(訳注:alpha2、alpha3、numeric)の中で最も広く使われているものであり、最も有名なものはインターネットの国コードトップレベルドメインです(いくつかの例外があります) JA
ISO3166-1:alpha3 3文字の国コードで、 alpha2 コードよりも視覚的にコードと国名が結び付けやすくなっています JPN

alpha2 コード(OpenStreetMap では常に大文字)は、 JA:Key:phone#Support for multiple countries のように、一部のタグで国に依存した値を追加するために使われています。

これは国に依存した地物をタグ付けするためのキーの接頭辞としても使われていますし(例えば、フランスにおける学校の国による分類は「FR:」の接頭辞が付いています)、特定の国でのみ意味を持つタグ値の接頭辞としても使われています(例えば、国によっては階層的な admin_level で正しく表すことができないときに、国内の地域を分類するために使われています)。

ISO 3166-2

ISO 3166-2 では、主要な行政区画(県や州など)や属領の名称に対するコードを定義しています。

通常、 boundary リレーションにおける boundary=administrative との組み合わせで使用されますが、 admin_level=* の値(OpenStreetMap では3以上)は国によって異なります。

キー 説明
ISO3166-2 ISO 3166-2 コードは2つの部分から成り、ハイフンで区切ります。
  • 最初の部分は国の ISO 3166-1 alpha-2 コードです
  • 2番目の部分は3文字以下の英数字で、ふつうは国によって与えられ、国の既存のコード体系に基づきますが、 ISO 自身で作成される場合もあります。

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.