Taking a landscape comprising distant hills, a middle ground and a rock about ten feet from you, requires a very deep depth of field. Just blindly taking the photo without taking the DOF into account can result in the hills or the rock being out of focus. reducing the aperture is no guarantee of success either. What you need to do is to focus on a point in the photo called the Hyperfocal (HD) distance.
To find the HD distance you must calculate it. This calculation involves using the f/stop, and the lens focal length, together with a strange photographic term called the circle of confusion (CoC). Can you imagine standing in the middle of a field with a calculator trying to solve a complex equation, assuming you can remember the equation. Well fortunately we do not have to go to that extreme. You can go to this website here
and use their calculator, or you can print out a table.
I like the calculator method but I'm not in love with the thought of standing in the field with a laptop together with my camera gear. So what to do? Printing out a table from this
website may be the answer for some, but I have a habit of losing printed tables and other assorted pieces of paper.
If you own an iPhone or an Android phone (Heaven forbid)
you can download an app which does it all for you. Most of us carry a phone around all the time, so why not use it. Download the app called DOFMaster for $1.99 and install it.
To use the app it may help to know that the CoC for all Minolta/Sony APS-C DSLR cameras is 0.02 and for full frame is 0.03. As you can see from the photo of my iPhone below you enter the Camera (or the CoC) in the top line (Sony A900). Next enter the focal length of the lens (28mm). Then enter the f/stop (f8). The list includes full, half, and one-third f/stops. The next line 'Focus' can be left blank or leave whats in there as it will be overwritten. On the same line choose feet, inches, meters or CM. Now touch the HD button and all the information will update to as shown.
Note that the Hyperfocal distance is shown and is inserted in the Focus field, that is where you focus the camera, (10.8 ft). You will also notice that the depth of field will be 5.4 ft to infinity. So our hypothetical photo with a rock at 10 feet from the camera will be acceptably sharp and the hills in the distance will be sharp. You may have to focus on the rock and recompose. This little app will also calculate for almost every camera on the market including Point and shoots and all Canikons.