I'm not saying don't take selfies. I'm saying don't be an idiot and get yourself killed taking one, because it happens, and it really, really shouldn't.
For those who are unaware, here are some places that have come out in the news where people have been killed taking selfies. Avoid them, ok? Getting that angle just isn't worth it.
According to reports from that railroad ALONE, 30 to 40 people are fatally injured by passing trains because they are on the tracks or near the tracks, and the conductors are not able to stop and an accident occurs.
So stay off the tracks. If you want a picture with a train, keep a SAFE distance! Think of them like high power cables-- you don't want to get close.
In front of dangerous wildlife
You never know what an animal is going to do when you approach it in the wild. You can't account for their actions. If you see a bear or other wildlife, follow the proper procedure to get away with it---the story is enough!!! You don't need a selfie to prove anything, and risking it could cause you serious injury. Or death. So there's that. Stay away!
Driving is already dangerous enough as it is; don't take your hands off the wheel to get that driving selfie. If you want to make the illusion, just pull over and take it. Everyone will be a lot safer then, as you're also endangering others when you selfie + drive!