Trains need a certain amount of space or they will crash into each other or into the terrain. They also need to be a certain distance from platforms and won't run to the very end of a track. Clearance doesn't necessarily mean that the node has to be air; this will be explained in the next section.
The diagram below visualises these requirements:
Linetrack boats need 5 metres of horizontal space instead of the usual 3 for trains. The code that handles getting off vehicles is still in need of a bugfix so that the platform is found correctly.
Air always provides clearance. However, which other nodes provide clearance depends on two things: