The problem here is that the train goes through right in the middle of the city, which is a total nonsense.
Train tracks, especially in rural areas, more often than not, go through towns and villages. I'm somewhat familiar with the Lac-Megantic area of Quebec and it's rural. Closest thing to a city in the immediate area is probably Sherbrook.
The cities are there because the railroads brought transportation to the area. Transportation brought the population. Population begot cities. Please read one of the many books on the settling of the US West. The same goes for the vast areas of Canada. There’s not one town in the West that does or did have a railroad running through it.