Via GPS or a wireless signal, the phone detects that you entered the train.
After a certain amount of time elapsed, or the phone detects that you are about to arrive at your destination, it will vibrate constantly, eventually making a wakeup if you fail to wake up from your nap.
Depending on your settings, this system could activate only when you use certain train station, or when you catch the train at a certain time.-- mofosyne, Oct 03 2011 A cell phone can already tell which tower it is in communication with. Maybe it just needs to give an alert based on the tower ID.-- Ling, Oct 03 2011 If this we're made slightly more generalized, so as to "do action X" when "approaching location Y" then it would be super useful. [+]
Approaching a grocery store? "Don't forget the Crumbed Cream", it would announce.
On the train, approaching your destination, "make a wakeup!" (or whatever you said).
Approaching your regular pub, "remember: buy one more pitcher and you've earned a free one".
Etc.-- swimswim, Oct 06 2011 I'd settle for an app for the Boston T that tells you which goddamn branch of the fucking Green Line takes you to WHERE YOU WANT TO FUCKING GO!!!
Sorry. I got a little out of control there. I'm better now.-- Alterother, Oct 06 2011 random, halfbakery