Mallard duck and its ducklings

Hello everyone, 

I was out walking yesterday when I crossed over a mainline railway using a pedestrian rail crossing, which goes over a public footpath between two fields. For those of you who live in the Cotswolds, this was on the Kemble to London Paddington line. 

I was astonished to see a Mallard duck and seven little ducklings walking alongside one of the two railway lines. They were walking right along the edge of the rail, using the rail as guidance. Fortunately, no trains were coming for a good couple of hours. I waited beside the crossing and watched them, trying to figure out where on earth the mother would have been leading them? 

At one point, two of the seven ducklings became separated and appeared to veer off on their own. The mother seemed to prioritise the five ducklings who were with her. Is this common behaviour from the mother? 

I guess I just wanted to see whether railway lines and Mallard ducks with their ducklings was a very rare combination? 

I have had a look at my Ordinance Survey map and I am really struggling to see where they were heading. The nearest water is around 2 miles away and would have involved travelling alongside the railway lines the whole journey. How far would the mother usually travel for with her ducklings? For your information, there are two railway lines that run parallel with each other. You tend to get a train every hour, although due to travel limitations during the coronavirus and a restricted schedule, it is currently more like a couple of trains (one in each direction) every two hours. 

I would be grateful for any information here. 

Thank you. 

With best wishes, 

James