The attorney is a good idea. My experience is a little different from Theo's. From my perspective, the railroads are the most protective entity over their property of any that we encounter. We have actually had one of their security officers draw his gun on a geologist because they were drilling a well adjacent to an active RR line (we had a permit). They usually will not let us anywhere near their abandoned lines and I have personally talked to CSX's legal department about sampling along an abandoned line with no luck. Of course I'm asking to collect environmental samples, which could result in liability, so you can't really blame them.

I do know of a about a mile of residential properties that purchased adjacent railroad property. Not sure about the cost but the City retained an easement (we are putting a sewer line down it next year). You will be lucky to beat the State and/or local government to them if available, up here they are all being turned into bike trails.