Similiar to the real world, there are four main directions in OTTD world (Fig 1).
However, the TTD world is built of many tiles which can be counted in four semi-directions: north-west (NW), north-east (NE), south-west (SW) and south-east (SE). They are called horizontal (SW to NE and vice-versa) and vertical (NW to SE and vice-versa) tiles.
Tiles counted from south to north (and vice-versa) or from east to west (and vice-versa) are known as diagonal tiles
Tunnels, bridges, airports, canals and roads can be built only on horizontal and vertical tiles (Fig 3). However, railway can be additionaly built in diagonal directions (Fig 4).
Internal representation
Internally in the source code each direction has an index. It may also be useful to know the translation between indexes and the relative positions which can be seen in the picture below: