Never mind. I was talking about the railway line from Bangkok. For most of the route from Bagnkok, it's closer to the east coast. You don't escape the troubled spot entirely as you have to go to Hat Yai before the line splits, after which, it does indeed run closer to the west coast.