UN/LOCODEs have five characters. The first two letters code a country by the table defined in ISO 3166-1 alpha-2. The three remaining characters code a location within that country. Letters are preferred, but if necessary digits 2 through 9 may be used, excluding "0" and "1" to avoid confusion with the letters "O" and "I" respectively.
For each country there can be a maximum of 17,576 entries using only letters (26×26×26), or 39,304 entries using letters and digits (34×34×34).
For the US, the letter combinations have almost all been exhausted. So in 2006, the Secretariat added 646 entries with a digit as the last character.
Loose consistency with existing IATA airport codes
For airports, the three letters following the country code are not always identical to the IATA airport code. According to the Secretariat note for Issue 2006-2, there are 720 locations showing a different IATA code.[2]
Official UN/LOCODE tables
UN/LOCODEs are released as a table. An individual revision is officially referred to as an "issue". A discussion of the table's structure follows.
SE GOT for Göteborg (Goteborg without diacritics) in Sweden. Subdivision is the Swedish county of Västra Götaland (see ISO 3166-2:SE). Function: port, airport, postal. The IATA code of XWL indicated in the table is that of a train station in the city centre of Göteborg (though not the Central Station), while the IATA code for the main airport (Göteborg Landvetter Airport) is actually GOT. It also has a separate reference entry showing an alternate spelling of Gothenburg.
Data fields
The fields are listed in the official order.
Ch (Changes)
A change from the previous issue is indicated by one of the following characters in the first column:[2]
X Marked for deletion in the next issue
# Change in location name (usually spelling)
¦ Other changes in the entry (not location)
+ Entry added to the current issue
= Reference entry
! Retained for certain entries in the USA code list ("controlled duplications")
Locode
The code is represented with a space between the alpha-2 codes of ISO 3166-1 country code and the 3-character element.
Name
Names of locations should be shown using the 26 letters of the Roman alphabet with, where appropriate, diacritic signs as contained in ISO 10646-1/1993 or ISO 8859-1/1987.
Name Without Diacritics
The name of the location, but non-practicable Diacritics may be ignored and should not be converted into additional characters(e.g., Göteborg may be read as Goteborg, rather than Goeteborg, Gothenburg, Gotembourg, etc.).
The ISO 1 to 3 character alphabetic and/or numeric code for the administrative division (state, province, department, etc.) of the country, as included in ISO 3166-2/1998. Only the latter part of the complete ISO 3166-2 code element (after the hyphen) is shown.
Function
Each defined function gets a classifier; the most important are:
1 = port (for any kind of waterborne transport)
2 = rail terminal
3 = road terminal
4 = airport
5 = postal exchange office
6 = Inland Clearance Depot – ICD or "Dry Port", "Inland Clearance Terminal", etc.
7 = fixed transport functions (e.g. oil platform)"; the classifier "7" is reserved for this function. Noting that the description "oil pipeline terminal" would be more relevant, and could be extended to cover also electric power lines and ropeway terminals.
B = Border crossing function
0 = function not known, to be specified
Status
Indicates the status of the entry by a 2-character code. The following codes are used at present:
AA: Approved by competent national government agency
AC: Approved by Customs Authority
AF: Approved by national facilitation body
AI: Code adopted by international organisation (IATA or ECLAC)
AM: Approved by the UN/LOCODE Maintenance Agency
AQ: Entry approved, functions not verified
AS: Approved by national standardisation body
RL: Recognised location - Existence and representation of location name confirmed by check against nominated gazetteer or other reference work
RN: Request from credible national sources for locations in their own country
RQ: Request under consideration
UR: Entry included on user's request; not officially approved
RR: Request rejected
QQ: Original entry not verified since date indicated
XX: Entry that will be removed from the next issue of UN/LOCODE
Date
The date the location was added or updated: 0207 is July 2002, 9501 is January 1995, etc.
The edition published in 2008 uses the value 0701 for additions, while in other cases the exact month is used like 9710, 0212.
IATA
For correlation purposes, the IATA code for the location is marked if different from the second part of the UN/LOCODE.
Coordinates
Some entries have coordinates in the database. They are represented as: ddmmN dddmmW, ddmmS dddmmE, etc.
Remarks
The remarks column can among other things contain a hint to what specifically was changed (See data field - "Change").
Availability
Availability
UN/LOCODE is available on the UNECE website, where the latest release of UNLOCODE directories and background documents are listed. Complete UN/LOCODE code list may be downloaded in the format of.mdb (MS Access database), .txt (text file) and .csv (Comma-separated values). HTML pages are also displayed on the website by countries.
Data Maintenance Requests
UN/LOCODE Data Maintenance Request system is web-based (http://apps.unece.org/unlocode/), which enables registered users to submit online requests for new UN/LOCODE entry modifications.
The system provides online functions for
Registration of users and password retrieval
Submission of requests for new UN/LOCODE entries
Submission of requests for modification changes in existing UN/LOCODE entries
The loc122sec.pdf says: "main code list has now over 90 000 entries and the database contains a total of over 100 000 records", "2012-2 includes 90 645 entries"
The loc131sec.pdf says: "2013-1 main code list has now over 90 000 entries and the database contains a total of over 100 000 records", "2013-1 includes 95 721 entries"