## 4 Results
### Data Processing
#### 4.2.3 Parametric Modelling  
On the city scale, we created 3D buildings by extrapolating the footprints to building walls, calculating the roof shape, and using the position and orientation to map the photographs onto the facade. These steps made it possible to create large-scale city models with basic geometric features. This feature is already applied on the world scale. There are a large number of parametric modelling approaches for roof features, most notably the straight skeleton approach [297] to compute a mediated topline of the roof (e.g., [298,299]). In our case, the key objective is to reassemble the roof shape as best as possible; therefore, our roof-generation approach is designed to create different roof shapes, which are to be compared and selected for the best match to photographs. To ensure a baseline 3D model, building footprints were pulled from OpenStreetMap and other providers, and the outer walls were modelled in the browser of the viewing client. Besides the building geometry, roof features are very important in assessing buildings [215]. Figure 8: Two SfM reconstructions calculated using SuperPoint + SuperGlue with bundle adjustment in COLMAP. Each red pyramid represents one photograph and its orientation and camera parameters. (**Left**): Reconstruction using 257 contemporary images of Charlotteburg, Berlin, from Wikimedia Commons. (**Right**): Reconstruction of the former regional court in Dresden from 41 historical images retrieved from a private archive. The roofs were generated based on the data loaded from OSM. The data returned the following values: type, orientation, height, angle, levels, direction, material, and color. The supported types are as follows: flat, y-shaped, dormer, half-hipped, skillion, gabled, quadruple saltbox, and hipped (Figure 9). The algorithm can be divided into two main parts: parts for squared and non-squared roofs. Squared roofs are built after calculating the midpoint of the four vertices, and according to the roof shape, the geometry (triangles) is created (Figure 10). For L-shaped roofs, more properties need to be calculated. First of all, the two shortest distances of the six-vertices for are calculated. These lines cannot be neighboring lines (they cannot have the same starting or ending point) and cannot be parallel (their dot product of vectors, created at midpoint, has to be much smaller than one). Then, at the mentioned midpoints, perpendicular lines are created. The crossing point creates a new vertex which combines two parts of the L-shaped roof. At the given height and shifted by some distance, vertices are added at the midpoints of the shortest lines to create the L-shaped top of the roof. Then, triangles are created based on the direction and the newly created vertices. Currently, we are able to process gabled, skillion, dome/onion, pyramidal, cone, and flat roofs with different levels of complexity (Figure 11). The algorithm can be divided into six sub-parts. Apart from properties provided from OSM data (like type, angle, or levels), sometimes extra data need to be extracted:  
* The center of the roof (midpoint between two coordinates from Cartesian extents of the shape). * The direction in which the tilt should be created (angle given by longest edge in the shape). The implementation for creating different types of roofs is currently as follows:  
* Gabled/hipped: First, the center of the roof and direction is determined. Next, based on the depth of the geometry (peak point, direction, and outer shape), the highest edge is created, and then the geometry is extruded. * Skillion: First, the angle of the roof and the pitch is determined. Then, the higher part is extrapolated to the pitch point and the slope faces are added. Figure 10: Sequencing a roof (**left**); segmenting complex roof structures into smaller segments (**right**). Figure 9: Types of roofs (image [300]). * Dome/onion: First, the largest circle within the points and its center are determined. Based on this, a sphere geometry is created and scaled according to the scale (height).