Practically speaking, it's damn near impossible for the federal government to fight a state and a large city on its home territory when the popular opinion is on the side of the state and city.
It's hard to fight popular opinion at *all*, and fundamentally the feds don't have the manpower. If the state government declares that (for example) they consider marijuana legal, that they consider the federal laws against it to be null and void, and that their law enforcement officials are prohibited from enforcing those laws or assisting in enforcing them, there is really not much the federal government can do; they can just about keep their own DEA agents out of state prison, but that's about it, and there aren't really very many DEA agents. They can't even call out the National Guard, because it's normally under the command of the governor, and if the governor orders them to work for the state and not for the federal government, you know which way it'll go. Anyway, I picked a real example there.
In practice, coal export terminals will not happen without local approval. The Native American nations have been the best at stopping them because they have uncontrovertible sovereign rights, and those are only overturned when federal judges are corrupt.
No major city or state has decided to actually stop coal trains from running through on the way to somewhere else -- they've simply stated that they would like the federal government to stop them. But several have made life very difficult for the coal trains by stringently enforcing every rule about coal dust they can think of. The railroads like a quiet life and will route trains through the route with the least opposition.
There's basically no alternate routes in the PacNW, however, thanks to an extremely underbuilt rail network; until the Centralia power plant shuts down, coal will probably still run through Edmonds. The railroads will quite rightly say that they aren't the ones demanding the coal.
I question why oil is running through Edmonds at all, since it doesn't seem to be on any logical route from any producer to any end-user. BNSF might reroute their oil trains just to reduce liability; running them through the tunnel under downtown Seattle (which is on the route through Edmonds) is a huge liability risk for them.