The most effective method of determining the coordinates of the railway track axis is mobile satellite measurements. However, there are situations when the satellite signal may be disturbed (due to field obstructions) or completely disappear (e.g. in tunnels). Then the ability to measure the value of the directional angle of a moving rail vehicle using an inertial system comes in handy. The directional angle is determined on a topographic map as the angle between the direction of the vehicle longitudinal axis (or the direction of a tangent to the track axis) and the reference direction, which is the north. The article presents a method for determining the directional angle of a railway line based on appropriate measurement data. The latter should be Cartesian coordinates of the track axis, allowing for the visualization of a given railway route and obtaining a general orientation about its course. The presented proposal for solving the problem refers to the assumptions made in the method of determining the curvature of the railway track axis using the moving chord.