When trying to photograph buildings it can be difficult to get the whole structure in without tilting your camera. For example in front of a tall building if you point the camera straight at the building then you you are only going to get a picture of the bottom half – see sketch below.
This is not only a problem when taking photographs of tall buildings, but also when you want to photo a building constructed on a hill where the ground slopes away. If you are trying to take the picture from a position which is either lower down or higher up, then you have to tilt your camera.
When you tilt your camera this has the effect of making parallel lines on the building appear to converge. So your image ends up like this;
The reason that this happens is that because when the camera sensor is parallel to the building all points in the subject are at the same distance from the sensor, and are recorded at the same magnification, but when the image sensor is not parallel to the subject, i.e. when you tilt the camera up at a tall building, parts of the building are at different distances from the sensor and so the more distant parts are recorded at lesser magnification, causing the convergence of parallel lines. Because the building is at an angle to the camera, it is also foreshortened.
Professional architectural photographers overcome this problem by using a perspective control (PC) lens or tilt shift lens. These are expensive items but produce better results than manipulating the image in software such as photoshop.
A PC lens has a larger image circle than is required to cover the image sensor. You can see a detailed explanation of these lenses here. The lens can be moved or shifted parallel to the sensor. This movement of the lens allows adjusting the position of the building in the image area without tilting the camera and thus avoids convergence of parallel lines and gives a normal looking image. Below you can see some pictures of a PC lens.