In your example, since you are designating a specific reference you should use "the"
cross over a river towards the northern train line
Expressed in this way, it may mean that there is different train line which lies further north.
To say it is the same train line extending north, you might say
cross over a river on the train line north
Since you are referring to the railway (route) and not just the train itself, it might be more natural to say
which crosses over a river
since the railway actually does cross the river, stating ability ("can") is awkward.
To express action and direction, a native might simply say
crosses over a river going north.
They went north.
They went going north.
They went towards the north.
They went northward.
Thw way your new sentence is constructed, you are saying the railway crosses over the northern side of the river. "Towards" only describes the direction faced, you need a verb to show movement.
which crosses over a river and travels north.
which crosses over a river and goes north.
which crosses over a river and goes towards the north.