In Google Maps Street View your cursor turns into a rectangular/oval shape as you mouse over different parts of the scene. For example:
As you move the cursor over the building it "hugs" the walls. It's not just as simple as following the intersection because if you continue on to the left you can see the angle change as it hits different faces of the buildings.
Do they do some sort of image analysis to identify faces of the buildings or do they, as they take the picture, do some sort of laser range finder and then later combine it with the picture?