It is advisable to be at least 15 feat away from the track in order to prevent accidents from happening. It is because even though you are not on the track but you're just close to it without any any distance, it could still lead to accidents because trains are fast and it could still affect those who are near to it. It could drag the car, leading to serious accidents.