If you need more room consider a trick I used in my last location. I had a three level RR but was stuck for a place to have a passenger terminal at both the top and bottom level of a new addition. I only had one square foot left that the zoning board would approve, so I poured an 8" diameter concrete piling out the back and ran an elongated "dog house" fashioned with "I" beam joists to span the distance. I then matched the roof, ridge vent and siding to make it blend. The blending did not work, the neighbors doubted my sanity.
One thing to consider for a RR addition. Corners can be wasted space so pushing the zoning limit, I chamfered the corners which allowed me to push the back wall out over two feet which ultimately elongated each right of way track 2'.