“Image courtesy of [bplanet] / FreeDigitalPhotos.net”.
The sharpest focal length (depending on your particular lens) is between f8 to f11. Who knew…….? I always pushed it up to the highest it could go which does give maximum depth of field but this apparently causes an effect called diffraction.
There will be times that, for all practical reasons, you cannot use an aperture between F8 and 11. So to get the best sharpness in all areas of your landscape shot, a process called Focus Stacking (or blending post process) can be useful. Press on the link to find out more.
For more on getting sharper images and understanding different focus modes on your camera please go to DPS (digital photo school).