The story of the decline and fall of rail lines in South Dakota closely matches the rise and fall of many South Dakota communities. A rail line (or lackthereof) was often the difference between survival and bust in early South Dakota.
According to a history of South Dakota Railroads compiled by the South Dakota Historical Preservation Office (available as PDF here), of the 285 new towns platted during the boom years of the late 1800s, 142 were platted directly by the railroad companies or their townsite subsidiaries. Many other towns were platted by close associates of the rail companies who sought to profit from land sales as the new rail lines were mapped. Land could be purchased cheaply prior rail site surveying and sold at a considerable profit after the railroad announced its intentions.
Towns that were built by the railroad or its subsidiaries often followed the same town plan. One of the most common was a T-shape with the town lying to one side of the railroad and situated along a commercial avenue perpendicular to the railroad (aka Main Street) that ended at the rail depot. A modern aerial view of the town of Dolton (built on what was a Chicago, Milwaukee and St. Paul line, now BNSF) clearly shows the T-shape pattern of town building.
Towns that were platted by the Chicago & Northwestern (CNW) rail line were also platted with a main commercial avenue running perpendicular to the tracks but situated the town so it lay on both sides of the line, in a sort of H-shape. This pattern can be seen in the town of Hetland, SD which is situated on a line originally built by CNW (now Rapid City, Pierre and Eastern railroad).
Street names were also staked out by the rail companies. Most railroad platted towns had all roads that ran parallel to the track numbered (1st, 2nd, etc) and those roads that ran perpendicular to the tracks were named to reflect company preference. The CNW line preferred to name perpendicular streets using state names and the Milwaukee line preferred to use either numbered avenues or names of railroad VIPs such as Lawton, Kimball, etc.
Town names were also often the choice of the railroad company or its employees. Bristol, Andover and Woonsocket were all named by C.H. Prior of the Milwaukee line. He grew up in New England and thus brought those familar place names with him. The CNW line was financed by British money and towns they platted often showed an decidedly English influence, such as Beresford which was named after Lord Beresford, a British financier. Other times, the railroad officials used local features, settlers or landmarks as town names. Railroad administration could affect location names in odd ways as well, as goes the legend of the naming of Menno and Freeman in the southeast part of the state. Town lore has it that Menno was meant to be Freeman (to reflect the new settlement's Mennonite population) and Freeman was to be the town name of the Menno site. But a a railroad clerical error had the town signs switched and so they remain "mis-named" to this day.
A railroad was such a boon to communities that existing settlements would compete to have railroads located to where a town had already been created. A entreprenuer in Clay County, John Marshall, made a frenzied attempt to have a rail line come through his land, going so far as to establish a post office and school at the last minute before the surveyors arrived. Alas for him, the line located far to the north instead and the village of "Marshalltown" faded into obscurity save its country school, which remains in place to this day.
Some South Dakota communities, such as Parkston, even moved their entire settlement to align with the railway when the company's chosen path didn't come close enough. Dakota City was established in 1883 and boasted several homes and businesses by the time the railroad began surveying a route to Mitchell in 1886. Town founders caught wind that the railroad intended to locate not along their site, but another location a few miles away. A rush of Dakota City settlers bought up the new town's lots when they became available in the spring and the first building was moved from Dakota City to the new town of Parkston on May 31, 1886. By June 25, the entire town had been physically moved to a new site and new buildings were going up at an average of one per day.
A rail map of South Dakota from the year of statehood, 1889, show the intricate network of lines that crossed mostly the Eastern, grain-producing, side of the state. Most of these railways were platted for maximum efficiency in bringing grain from local farms to the eastern production facilities in Minneapolis, Chicago, etc. Railways were also the way in which new areas of South Dakota were settled, this bringing in ever more farming families to the state. The state historical society's research showed that in 1870 the southern half of Dakota Territory had 11,776 residents. By 1880 that number stood at 98,268 while five years later the population had reached 263,411. During the same period railroad mileage went from zero to 2,456.1 miles.
Economic changes and a long-term drought which affected crop production for nearly a decade saw few rail lines built in Eastern South Dakota after 1887. The railroad industry as a whole saw mass consolidation throughout the late 1800s. The opening for settlement of lands in Western South Dakota and the CNW's ambitious plan for a rail route to the Puget Sound set the stage for another era of rail building in the early 1900s, this time almost exclusively West River. Another land boom saw rail companies once more platting new towns along their routes, resulting in names like Kadoka, Murdo and Presho being added to the map. Rail lines in South Dakota reached their peak in the late 1910s as seen on this 1913 rail atlas of South Dakota.
Over the decades that followed, many rail lines were rendered progressively obsolete by new forms of transportation and communication. By the 1950s, most of South Dakota's passenger services were retired as automobiles became the primary mode of transportation. The last railway-operated passenger train ended in 1969. Changes in the agricultural economy saw many of the spur lines servicing smaller towns become unprofitable and throughout the 1960s and 70s, hundreds of miles of train tracks were abandoned and by 1980, over 60% of the state's rail mileage had disappeared.
To combat this decline, the South Dakota Railway Authority was established in 1980 and spent the ensuring decades working to preserve and make viable South Dakota's existing rail infrastructure. Industry changes and agricultural advances have seen several rail lines come back into service and today, South Dakota now has more rail miles than at statehood.