TransDEM and Surveyor. There's a bit of a learning curve but you can create nearly any place you want to model whether it's a disused railway or a current line. You can even go as far as to use real terrain and put in a railway where no line ever existed but is plausible. I've done that with some success.
Using TransDEM, you can download current DEM data for the area you are modeling, superimpose ordinance maps (topographic) on top either as a texture on the terrain or as tiles, and export everything as a route ready for placing rails, buildings, textures, and roads.
http://www.rolandziegler.de/StreckeUndLandschaft/startseiteTransDEMEngl.htm
This is not freeware but the investment is very small and more than worth it in the end.