# Building Function Recognition Using the Semi-Supervised Classification
## 3 Methodology
### Building Impact Factor Calculation  
The difference between buildings cannot be shown only by coordinates and the height of the buildings [52]. Several attempts were made to describe the building more comprehensively. [PERSON] et al. introduced 8 geometric feature factors of buildings to extract the features from building footprint, including building height, circumscribed circle radius, building orientation, minimum enclosing rectangle area, compactness, complexity, density and shape [1; 2]:  
* [leftmargin=*  
* Complexity  
Complexity means the complexity of a building footprint structure, which is calculated by the proportion between skeleton line lengths and the building footprint perimeter. This formula is as follows:  
\[Complexity=\sum_{i=0}^{m}Skeletonline_{i}/Perimeter \tag{1}\]  
\(m\) refers to the number of skeleton lines in the building footprint;
* Compactness  
Compactness means the compact and plump degree of building footprint and is always used for the comparison and analysis of urban morphology [53]. In the case of different shapes with the same area, the compactness of their spatial distribution is different. An equation was formulated based on the moment of inertia [54] and as follows:  
\[Compactness=\frac{A^{2}}{2\pi I_{g}} \tag{2}\]  
In Equation (2), \(I_{g}\) refers to inertia moment, and \(A\) represents the area of the footprint. In this work, we suppose that all building footprint consists of several infinitesimal area units \(da\); it can define the inertia moment as follows:  
\[I_{g}=\int z_{g}^{2}da \tag{3}\]  
In Equation (3), \(z_{g}\) denotes the distance of centroid of building footprint from \(da\). The value of \(I_{g}\) ranges from 0 to 1. If \(I_{g}\) is equal to 1, it has a circular footprint. On the contrary, when \(I_{g}\) approaches 0, the building footprint is close to a line and is the least compact;  
Figure 1: The workflows of building function recognition using semi-supervised classification.  
* Orientation Orientation Orientation is defined as the direction of the MBR in footprints and shows the direction consistency of a building with other buildings. Accordingly, orientation is calculated based on the vertexes coordinates of MBR, and the equation was formulated as follows: \[Ori=\left\{\begin{array}{ll}\arctan\frac{y_{3}-y_{2}}{x_{3}-x_{2}}&x_{1}\
eq x _{2},l_{2}\geq l_{1}\\ \arctan\frac{y_{1}-y_{2}}{x_{1}-x_{2}}&x_{1}\
eq x_{2},l_{2}<l_{1}\\ \frac{n}{2}&x_{1}=x_{2}\end{array}\right.\] (4) where \(l_{1}\) and \(l_{2}\) refer to the edge's length of MBR. Correspondingly, (\(x_{1}\), \(y_{1}\)), (\(x_{2}\), \(y_{2}\)) and (\(x_{3}\), \(y_{3}\)) in Equation (4) represent vertex coordinates;
* Density The term \"Density\" in this paper refers to the building density within a certain range. Before calculating this index, A buffer with a maximum radius \(R\) of buildings was conducted according to the footprint centroid. The density formula derived from the ratio of the sum area of building footprints in the buffer to the buffer area is as follows: \[dens=\frac{\sum\limits_{i=0}^{n}A_{i}}{\pi\times R^{2}}\] (5) where \(A_{i}\) describes the \(i\)-th building's area in the buffer, and \(n\) means the building number within the buffer area. The value of density ranges from 0 to 1;
* Shape Building shape was introduced to represent the span ratio of the building footprint. There are three typical types of building shapes: expansive, circular and compact. The calculation formula is as follows: \[Shape=\frac{L}{2\sqrt{\pi\times A}}\] (6) where \(A\) represents the area of the building footprint, and \(L\) denotes the longer edge of MBR.