# 4D Building Reconstruction with Machine Learning and Historical Maps
## 4 Methodology
### Predictors  
A predictor is a variable used to train a specific learning model to predict something. According to their informative level and reported details, historical maps are the only source for deriving information about building footprints and their spatial distribution in the past. Aside from the building's shape, some blocks' designated use is generally the only additional information obtained from these documents. Data on building heights can be exclusively derived comparing blocks still existing in the same shape, or, approximately, from available photos in the other cases. When data are only derived by historical maps, the selection of the predictors is conditioned by the lack of further cadastral information (e.g., the number of storeys) or aerial views. Therefore, geometric properties and position of the digitised blocks, as well as data from neighbourhood analyses, are the only features usable for the prediction. In this work, three different types of attributes were computed for each digitised building footprint and used as predictors for inferring building heights:  
* Geometric predictors: 1. Area: defined as the building footprint area; 2. Perimeter: defined as the footprint perimeter; 3. NPI: the normalised perimeter index, an indicator of the polygon shape complexity. It is computed as the ratio of the perimeter of the equal-area circle and the perimeter of the shape (1): \[NPI=2\sum\frac{\pi A}{p}\] (1)
* Vertices: the number of vertices of a digitised polygon (Figure 6a); 5. Length MBR: the length of the minimum bounding rectangle (MBR) of a footprint; 6. Width MBR: the width of the minimum bounding rectangle (MBR) of a footprint; 7. Area MBR: the area of the minimum bounding rectangle (MBR) of a footprint; 8. Ratio: the ratio between the area of a footprint and the area of the corresponding minimum boundary rectangle (MBR).
* Neighbourhood predictors: 9. Neighbours: defined as the number of adjacent polygons; 10. Distance: the distance of a polygon's centroid from the nearest centroid (Figure 6b); 11. Density: the kernel density values (Figure 6c), considering four different estimation radii (50 m, 100 m, 150 m, 200 m), defined as (2): \[Density=\frac{1}{(radius)^{2}}\sum_{i=1}^{n}\sqrt{[\ \frac{3}{\pi}pop\ (1-(\frac{dist}{ radius^{2}})^{2})]}\] (2) where \(i=1\dots\), \(n\), are the input points, \(pop\) is the population field of the point \(i\), and \(dist\) is the distance between point \(i\) and the \((x,y)\) location.
* Positional and categorical predictors: 12. Position (X, Y): the planar position of each polygon centroid within the map; 13. Group: the aggregation of polygons in building blocks (Figure 6d). A \"group\" value is assigned to each polygon belonging to the same building block, while isolated buildings are grouped; 14. Class: defines a building of specific historical value, such as churches, palaces, castle, and tower; 15. Function: defines the civil or religious function of the buildings. In our cases, civil buildings were also grouped considering their approximative period of construction, derived by comparing multi-temporal historical maps;(16).  
Towers: includes a shape-based classification of the civil and religious towers, i.e., circular, rectangular, or octagonal shape. In our cases, we noticed that towers with similar shapes featured similar heights.  
The computed predictor values, especially for the geometric and neighbour attributes, are strongly conditioned by the historical maps' level of detail and the consequent digitisation (Figure 1). Based on the quality of the building footprints (i.e., depicting a single building or a group), attribute values can significantly vary. Their combination with further attributes has been introduced to support the predictions, especially when the digitised maps suffer from a poor representation of man-made structures.