Anything involving a railroad is a PITA. In one case, I very carefully read the wording in the record describing the centerline of the railroad as it passed from one side of the section to the other. The location of the rails was off by something like 300 feet on one side of the section and maybe 150 feet on the other. It appears the description was written prior to the construction and the construction ignored the written words entirely.
All that is special for railroad is they are interstate commerce, so they are largely exempt from zoning or local permitting. They can do whatever they want with their land.
Heck, I'm afraid to even cross a railroad here.