## 5 Discussion  
The use of the GNSS in the area of rail transport is a subject of ongoing research. A number of publications have been devoted not only to the application and adaptation of this technology in connection with the localization of rolling stock, but also to its reliability and accuracy. However, in spite of significant advances in research, it has not yet been possible to fully implement this technology in the field of rail transport safety, which may include the ETCS. On the other hand, the GNSS has been used successfully in rail transport for many years, especially in areas where the error inherent in the GNSS can be accepted. This includes, for example, supplementary systems to support traffic control on regional and single-track lines. The frequent occurrence of emergency traffic situations clearly demonstrates that regional lines with lower traffic rates do not substantially reduce the risk of train collisions or abnormal situations. One of the main objectives of the presented work was the proposal of a suitable methodology for the construction of an original multilayered model of a railway network, where the individual layers of the model reflected the railway infrastructure in different degrees of abstraction. Despite a number of constraints in the input data, a set of algorithms for the automatic generation of a multilayer model (represented by an undirected graph) reflecting the individual hectometers of the railway network was successfully designed. The hectometers were physically located in the railway infrastructure (at intervals of about 100 m), and GPS coordinates were available for each of them. As the above-indicated research demonstrated, several localization systems exist in the world based on the GNSS. However, these systems are often complemented by further elements that participate in the resultant localization. Therefore, a mere GNSS-based localization may not be considered original; we have to take into view the overall localization system concept using GNSS as a general supplier of information about a rail vehicle's position and its consequent connection with the designed railway network model. This is one of the reasons why this article put stress on the algorithms and methodology of building a railway network model and on the proper description of localization and its use in the detection of nonstandard situations for the additional support of rail transport control by dispatchers. The actual detection of the current position of the railway car is based on finding the nearest vertex and edge of the graph and calculating the exact position of the car relative to the corresponding edge of the model. The detection of the current position includes the evaluation of the relevance of incoming GPS information from the communication terminal. To detect nonstandard or risky situations in rail transport, there is a long-term trend of introducing a single European Train Protection System (ETCS) within all the EU member countries. However, complex Europe-wide systems are primarily designed for main railway corridors with a high traffic intensities. The application of the above-mentioned control systems on regional and individual lines is not currently envisaged (given their low capacities). The continuing occurrence of crisis operational situations has proved that lower frequencies on regional and individual lines do not significantly reduce the risk of train collisions or nonstandard situations. For a more realistic calculation of the distance between two rolling stocks, a multilayer rail network model reflecting an unoriented graph combining the data-micro and data-meso data layers was used. Attention was paid when two vehicles were located on: