Nearly a thousand people have died in 2019 alone due to the unsecure railway crossing system. According to reports the highest number of deaths were reported from the Fort-Galle railway line. Furthermore, there are 822 unprotected railway crossings at present. As a solution to this issue of unprotected railway crossings, by using new technology a formal procedure can be developed. That is, by using GPS technology, we can prevent accidents by building a safe and secure railway crossing system.