Since their rise in the 19th Century, railways have been at the forefront of modern engineering and transport, conquering dizzying altitudes, wilderness, seas and cities.