The countries are catalogued by the properties of their borders. The letters N, C and L stand for
(number of) Neighbors, Coast border and Land border.
The number of neighboring countries is 0 for islands. For the coast border and the land border the
following system is used:
8
N
|
4 W--+--E 2
|
S
1
If the north border is mainly coast, 8 is added to the number behind C, otherwise 8 is added to the L number.
If the west border is mainly coast, 4 is added to the number behind C, otherwise 4 is added to the L number.
If the east border is mainly coast, 2 is added to the number behind C, otherwise 2 is added to the L number.
If the south border is mainly coast, 1 is added to the number behind C, otherwise 1 is added to the L number.
Then the numbers are converted to hex numbers. The C number and the L number always sum up to 15 (hex: F).
All islands have only coast borders, therefore they all have CF and L0. Ghana has only a south coast, so it
has C1 and LE.
Finally the order of the complete code is determined by the number add ons, the highest add on comes first and
the lowest comes last. If the numbers are equal alphabetical order is used.
Portugal has only one neighbor country, namely Spain => N1
It shares the north and the east border with Spain => 8+2=10 -> hex A -> LA
The west and south border are coast => 4+1=5 -> C5
Finally the complete code ordered by the add ons: LA-C5-N1