As a geographer, I can say humans had a vast understanding and knowledge of the size of the world before the construction of the railroads.
The most important aspect of railroads, strictly geographic, was the precise mapping of the man-made features (the rails, depots and the surveyed railroad lots) against the physical world and the actual topography of the land.
It wasn't until the nationalization of the railroads during WWI that accurate maps were made to define what property and rights the railroads had, the acreage in each state/city and how long the rail centerline was in each jurisdiction. .