Actually they all start out as a test, built up from scratch every time (good to get the hang of it). So I click some seeds for a decent landscape, but that's not perfect indeed. I tried to make a crossing (rail crossing road), but couldn't figure it out yet. In a reasonably flat landscape it is not hard, but try making a road or railway in a mountainous area... we really need a 'local leveler'.
Tutorial; make a long (north-south) simple shape and warp (warp shader, redirect (X) shader and displacement shader) this by a power fractal or perlin 3D (for smoother effect). To view, hook into blend input of surface layer. Your line should be snaking north south. There are threads around where this is described. This is the base actually, because the other lines (wider and softer for the verge, narrow for the lines) are also north south simple shapes, with their own warp shader, but warped by the same redirect shader.
With some merge shaders you can make combinations after the warping and use them as masks for vegetation and rocks, etc.
The sleepers (and the attachment stuff) are a very simple painted masks (greyscale tiff into image map shader) set to repeat Y, and also warped by the same warper.
To flatten the area of the rail/road you can also use a wide (soft) simple shape (warped) and use this as a (blend) mask for the terrain; two copies of the same terrain, but one smoothed out (smallest detail larger, stretched perlin in one direction). You'll get a long way now, I'd say.