No, live train data in the UK is already publicly available, e.g. see https://www.opentraintimes.com/
This is matching your phone's location to the already public train data.
This is matching your phone's location to the already public train data.
But what is getting that?
"You" here means another app that integrates their API (or you as an individual using the demo on their website). How the other app gets it is up to the other app - ideally it also just queries it directly and requires location permission.