During the 19th century railroads spread across Europe North America and many other parts of the world