The invention provides a method and system for obtaining a three-dimensional model of a building. According to the method and system for obtaining the three-dimensional model of the building, optimal side faces and optimal oblique aerial photos which correspond to all the actual side faces of the building are selected according to exterior orientation elements of the oblique aerial photos and a method for calculating areas of oblique aerial photos, blocking parts between the optimal side faces are removed, and differential rectification and clipping are conducted on the optimal side faces, with the blocking parts being removed, in the optimal oblique aerial photos, so that the side face textures of the building are obtained and the accuracy of the side face textures of the building is improved; the one-to-one correspondence between the obtained side face textures of the building and a building blank pattern is established according to the optimal side faces, so that the textures, obtained through oblique photographing, of the building are automatically mapped to the building blank pattern, and the obtained side face textures and top surface textures of the building are mapped to the obtained building blank pattern, so that the three-dimensional model, provided with the side face textures and the top surface textures, of the building is obtained. The method and device for obtaining the three-dimensional model of the building have the advantages that the mapping processes are simplified, the automation degree is improved, and the modeling cycle is shortened.