## 5 Conclusions  
This paper presents a framework for obstacle detection in railway environments. The proposed methodology integrates a long-range LiDAR system with the train's latitude, longitude, and altitude to determine whether there are any obstacles ahead of its path. This involves the determination of a search volume from prior knowledge of its path and employing the DBSCAN clustering algorithm to identify obstacles within the defined area of interest.  
The system was subjected to multiple tests, including trials on a moving locomotive along the Contumil-Leixoes line, to evaluate the approach's effectiveness under operational conditions.  
Ultimately, it was shown that it is possible to augment obstacle detection in railway operations using the combination of LiDAR data with GNSS and advanced clustering algorithms. If such a system can help reduce the overall occurrence of collisions, the economic and societal benefits would be noticeable, as even a single disruption can affect the lives and livelihoods of many.  
Future work will focus on extending the framework to more complex railway environments and conditions to assess its robustness under diverse operational conditions.  
Another avenue for further improvement to the method would be distinguishing among different obstacle types in order to be able to tell the difference between a moving obstacle that may not require braking and a stationary obstacle that will require braking. Besides this, a comparison with established approaches such as Radar and Deep Learning would be interesting, although neither was available during this work.  
Finally, integrating additional sensors into the proposed data-fusion method, such as cameras or thermal imaging, could further enhance system reliability and performance. These improvements will help refine the framework for broader real-world applications.  
Conceptualization, S.D. and P.J.S.C.P.S.; methodology, S.D. and P.J.S.C.P.S.; software, S.D. and P.J.S.C.P.S.; validation, S.D., P.J.S.C.P.S., J.N., F.A. and N.V.; formal analysis, S.D., P.J.S.C.P.S. and J.N.; investigation, S.D., P.J.S.C.P.S., J.N., F.A. and N.V.; writing--original draft preparation, S.D., P.J.S.C.P.S. and J.N.; writing--review and editing, S.D., P.J.S.C.P.S., J.N., F.A., N.V., P.J.T. and P.M.G.P.M.; project administration, P.J.T. and P.M.G.P.M.; funding acquisition, P.J.T. and P.M.G.P.M. All authors have read and agreed to the published version of the manuscript.  
This work was developed in the scope of the project LAETA2023 - Ref \"UIDB/50022/2020, funded by \"Programa Financiamento Plurianual de Unidades de l&D\" of the \"Fundacao para a Ciencia e a Tecnologia\" and in the scope of the project FERROVIA 4.0, n\({}^{\text{o}}\) 46111 which has received funding from \"ANI-Agencia Nacional de Inovacao, S.A.\" through the program \"Mobilizador COPROMOCO_PT2020\".  
Not applicable.  
The raw data supporting the conclusions of this article will be made available by the authors on request.  
Map data copyrighted OpenStreetMap contributors and available from [[https://www.openstreetmap.org](https://www.openstreetmap.org)]([https://www.openstreetmap.org](https://www.openstreetmap.org)), accessed on 1 July 2024. This article is a revised and expanded version of a paper entitled \"A LiDAR based obstacle detection framework for railway\", which was presented at the 6 th International Conference on Applications of Optics and Photonics (AOP2024), University of Aveiro, Portugal, 16-19 July 2024.  
The authors declare no conflicts of interest.  
References