# Multilevel Regularization Method for Building Outlines
## 2 Materials and Methods
### Detailed Regularization and Enhancement of Parallel and Perpendicular Relationships  
#### 2.4.1 Detailed Regularization  
Detailed regularization primarily eliminates repetitive nodes, collinear nodes, and acute concave nodes on building outlines and completes missing corner nodes. Elimination of Repetitive Nodes: When the positions of two adjacent points (\(P_{i}\), \(P_{i+1}\)) in the building outline nodes are equal or approximately equal, only one of them is retained. Duplicate nodes can be determined by setting a distance threshold \(d\). If the Euclidean distance \(d_{i(i+1)}\) (\(P_{i}\), \(P_{i+1}\)) between two adjacent points is shorter than \(d\), these points are considered repetitive nodes. Typically, \(d\) can be set to 0.1 m. For example, in Figure 12b, nodes 14 and 15 during Process A are considered repetitive nodes, as the Euclidean distance between them is less than \(d\), and node 15 is deleted. Elimination of Acute Concave Nodes: When a point \(P_{i}\) on the building outline deviates from the main outline, it forms a sharp triangle with the preceding and succeeding nodes \(P_{i-1}\) and \(P_{i+1}\). In this case, point \(P_{i}\) becomes an acute concave node and should be deleted. Whether a node is an acute concave node can be judged based on angle threshold \(\alpha\) and area threshold \(S\). If angle \(\alpha_{i}\) of the acute corner or area \(S_{i}\) of the jagged triangle is less than the respective threshold (\(\alpha\) or \(S\)), point \(P_{i}\) is considered an acute concave node. Typically, \(\alpha\) can be set to \(5^{\circ}\), and the value of \(S\) depends on the data resolution, with higher resolutions requiring smaller \(S\) values. For instance, in Figure 12b, during Process B, node 6 and the triangle formed by it with the preceding and succeeding nodes 5 and 7 have an area smaller than \(S\); thus, node 6 is deleted. Elimination of Collinear Nodes: When the segment between node \(P_{i}\) on the building outline and its preceding node \(P_{i-1}\) is parallel or approximately parallel to the segment between node \(P_{i}\) and its succeeding node \(P_{i+1}\), the middle node \(P_{i}\) should be eliminated. Whether a node is collinear is determined based on angle threshold \(\beta\). If \(180^{\circ}-\beta_{i}\,|<\beta\), where \(\beta_{i}\) is the angle of the broken lines formed by the three adjacent nodes with \(P_{i}\) as the vertex, then \(P_{i}\) is considered a collinear node. Typically, \(\beta\) can be set to \(1^{\circ}\). For example, in Figure 12b, during Process C, nodes 9, 10, and 11 form angle \(\beta_{i}\) at vertex 10, which satisfies \(1180^{\circ}-\beta_{i}\,|<\beta\); thus, node 10 is deleted. Completion of Corner Nodes: Building outlines extracted from remote sensing images often have sloping corners because not every corner is successfully extracted. These corners must be completed by extending segments \(P_{i-1}P_{i}\) and \(P_{i+2}P_{i+1}\) that precede and succeed segment \(P_{i}P_{i+1}\) until they intersect at point \(P_{t}\). Then, area \(S_{i}\) and the smallest internal angle \(\alpha_{i}\) of triangle \(P_{t}P_{i}P_{i+1}\) are calculated. Thresholds \(\alpha\) and \(S\) are set similarly to those in the processing method for acute concave nodes. If \(S_{i}<S\) or \(\alpha_{i}<\alpha\), node \(P_{i}\) is replaced with \(P_{t}\), and node \(P_{i+1}\) is deleted. In Figure 12b, during Process D, the extended lines of segments 15-16 and 18-17 intersect at point \(P_{t}\), and the triangle formed by \(P_{t}\) and nodes 16 and 17 has an area smaller than \(S\). Therefore, node 16 is replaced with \(P_{t}\), and node 17 is deleted. 4.2 Enhancement of Parallel and Perpendicular Relationships Based on the Main Direction of the Building Outline  
After the \"overall-local-detail\" stepwise regularization process, the building outline becomes more regular. However, building outlines are mostly composed of polygons with the adjacent edges being perpendicular and opposite edges being parallel.