structural:reformatting
Bed and foundation

Railway tracks are generally laid on a bed of stone track ballast or track bed, which in turn is supported by prepared earthworks known as the track formation. The formation comprises the subgrade and a layer of sand or stone dust (often sandwiched in impervious plastic), known as the blanket, which restricts the upward migration of wet clay or silt. There may also be layers of waterproof fabric to prevent water penetrating to the subgrade. The track and ballast form the permanent way. The foundation may refer to the ballast and formation, i.e. all man-made structures below the tracks.

Some railroads are using asphalt pavement below the ballast in order to keep dirt and moisture from moving into the ballast and spoiling it. The fresh asphalt also serves to stabilize the ballast so it does not move around so easily.

Additional measures are required where the track is laid over permafrost, such as on the Qingzang Railway in Tibet. For example, transverse pipes through the subgrade allow cold air to penetrate the formation and prevent that subgrade from melting.