With the existing pipelines loaded at full capacity, oil producers from the shale fields and Alberta's oil sands have to find alternatives in order to move the crude toward refineries. Pipeline builders have a hard time getting the necessary regulatory approvals for the sake of environmental safety, and crossing the U.S. and Canadian border with this infrastructure is getting harder then ever -- TransCanada's Keystone XL pipeline project is still on hold.

Therefore, the oil industry has to adjust rapidly, and producers are turning to the railway network, with some companies seeing a unique opportunity to profit from this situation. Thus, let's take a look at my three favorite railway companies that are set for a huge benefit.

With more than 32,500 miles of railroads, Burlington Northern Santa Fe Railway transports more than 656,000 average-sized tanks filled daily with crude from the Williston Basin to the refineries, since it is involved in 16 of the 19 top oil-producing counties in western North Dakota and five of the six of eastern Montana. The company currently serves several major North American shale plays such as the Eagle Ford, Permian Basin, Niobrara, and Mississippian Lime.

Source: Burlington Northern Santa Fe (BNSF) Railway

Year-on-year, 2012 industrial revenue increased 22% over 2011, showing the amazing growth in transportation services. BNSF railroads crosses 28 states and two Canadian provinces, serving more than 40 ports. Moreover, with 31 intermodal facilities, the company's network has access to all main markets from the Midwest to the West Coast. BNSF is currently testing LNG-powered long-haul locomotives, a technology that will revolutionize its industry.

As of February 2010, the company is a subsidiary of Warren Buffett's Berkshire Hathaway (BRK.B -0.68%). By the end of 2014, BNSF will serve over 50 inland and coastal refineries in North America.

My second favorite is one of the leading transportation companies in the U.S., covering 23 states across the western two-thirds of the nation. Union Pacific (UNP -1.82%), through its principal operating company, Union Pacific Railroad, has more than 31,900 route miles and reported $19.2 billion in freight revenue. The company declared, for Q3 of 2013, revenue of $883 million from its chemicals segment, a 10% increase over the same period last year.

Source: Union Pacific network map

Furthermore, comparing Union's volume drivers of first half of 2013 with last year, revealed a 39% growth in shale related crude transportation, to the detriment of grain (-20%) and coal (-10%). Union crude-by-rail activities include North American premier oil-producing areas such as the Canadian oil sands, Permian Basin, Bakken, Niobrara, and Eagle Ford shales.

A significant portion of Union's growth capital investment in 2012 was targeted to the southern region of its network to meet growing demand for crude transportation. It continued as well this year with several investment such as its Fort Worth terminal, which is a major network yard that supports Texas oil and gas fields in the area.

CSX (CSX -3.02%) is a rail and intermodal corporation that provides rail-based transportation services including traditional rail service and the transport of intermodal containers and trailers in the eastern U.S. Its 21,000-mile route crosses 23 states, connecting every major metropolitan area in the U.S. and two eastern Canadian provinces, and has access to more than 70 port terminals and 36 yards. CSX operates 1,350 daily freight trains, transporting an average of 20,000 carloads per day.

Source: CSX network map

The chemicals segment's revenue increased 11% in Q3 of 2013 compared to the same period last year, to $469 million, due to increased supply of crude from shale drilling activity. The segment was the prime catalyst of the industrials sector, accounting for 44% of total shipment.

Foolish conclusion
Freight railroads are currently playing a critical role in the U.S. Rail shipments of crude oil have skyrocketed in recent years due to the jam in the pipeline network. Oil producers won't reduce their production pace, so alternatives have to be found. There is a lot to like in moving crude by rail for producing companies. The geographical flexibility of railroads allows the shipping of crude to different areas, depending on the market needs and price opportunities.

Furthermore, railroads can maximize efficiency by developing new rail facilities to store, load and unload tank cars and reduce shipment time. Finally, building rail infrastructures are quicker than building pipelines and refineries, which allows the railroad industry to be a step ahead of production growth, from well-established shale formations to emerging plays throughout the country. Therefore, railway companies are profiting from the surge of oil production and the current situation isn't about to change in the foreseeable future, thereby offering appealing opportunities to investors as well.