I have found it frustrating when my camera is on its limits to get a decent depth of field (everything in focus) Its not a brilliant camera, a simple 10.2 Mp Samsung L201 (£80) but it does allow manual setting of Fstops up to 7.6.
I have found through trial and error that I can get a half decent picture with reasonable depth of focus, but since moving to N gauge the greater distances and smaller models have made this harder.
Anyway I downloaded the free trial of Helicon Focus and gave it a try.. I started with a series of pictures taken by focusing the view finder at ever further objects but always taken with the same centre point. In this case I pointed at different points working back along the track then with the shutter button half depressed to maintain the focal length moved the camera to have the bridge in the centre of the view finder. This gave the following series of pictures, compare top left to bottom right for the most contrast...
These pictures are then all opened in Helicon Focus and a couple of clicks later the software combines the best focus bits of each to produce this...
Now don't ask me how this works, I don't know and don't mind ! But it does.
Once saved I opened it in my usual photo editing soflware and cloned some sky to get rid of the joints but that was all.
AMAZING !!! Thanks for the link Mr Nevard !