Protests against a planned pipeline have forced the closure of the third-largest rail network in North America.