Safety should be a regular consideration when doing photography.
A woman was seriously injured the other day when she fell off a bridge while trying to take a photo! http://www.torontosun.com/2014/10/29/woman-plunges-off-highway-of-heroes-overpass
Several people have fallen at Niagara Falls while taking photos, usually it doesn’t end well. Here is a news article from one event: http://www.thestar.com/news/gta/2011/08/15/student_swept_over_niagara_falls.html
It’s not just trespassing, or trains, safety should be a regular part of the process.