I'm too glad that it went this way and nothing happend to you,
you are one lucky man, I couldn't imagine facing a bear , I just don't know what I would've done..., this is the reason I do not fish streams,
I think my life is more important than catching a few fish, for this reason I stick to lakes only
,
I also heard that when you come across a bear like that , you're supposed to try to appear bigger and not run but slowly retreive backward direction, and yeah I guess climbing a tree is not an option as that bear would prolly climb it or topit over..., you're lucky there was a train there.
Yeah man , get that bear spray and stay safe !!
Good luck.