If you carried a tilt-shift lens or a view camera this would be rather simple image to capture. Another technique is to use a 'focus bracket' and blend the images in a third-party software like Helicon Focus. This approach also allows you to make the capture at the sharpest lens opening which is usually 2-3 stops down from wide open.
IN this particular image I foiund the farthest (usually infinity with my 28MM lens) and the the closest point of focus. I then bracketed the focus starting at the near point and making several exposures with the last one being, in this image, infinity. The number of exposures can run from 4 to 8 or 10. I tend to make a few extra captures just to be safe.
You then take all of the captures and blend them in Helicon Focus and your output is an image that is sharp from foreground through background.
I thank Dr. Mark Dubovoy for teaching me this technique several months back.
HHmmmm: Might need to try this with my IP4 on a tripod...will advise