# Methodology for the Efficient Progressive Distribution and Visualization of 3D Building Objects
## 3 Methodology
### Generalization Methods to Generate a BuildingTree
#### 3.2.2 Generating the CLOD Model from LOD3 ES  
The generation of the CLOD model from LOD3 ES is only done for 3D building objects that are sufficiently regular to be decomposed (as shown in Figure 4); building objects that are not decomposable (those that have a round shape or other non-rectangle structures) are preserved as LOD3 ES. For regular building objects, the basic approach in this step is to identify the building parts in the LOD3 ES model and store them in a total hierarchical data structure. The generation of the CSG representation CLOD is done in three steps: _building segmentation_, _decompose cross-sections_ and _prototype extraction and classification_. Figure 4: CLOD generation workflow. The segmentation process starts by identifying cross-sections using Algorithm 1, i.e., all points in the building geometry are grouped if they are the same height (or a height within a threshold distance). Currently, the cross-sections method can only deal with the horizontal structure, and the vertical or non-horizontal method will be further studied in future work. The input of the algorithm is Point Set (_CS_) and the output is a list of cross-sections that are composed of its 3D points. In Figure 5, the original building is modelled with three horizontal cross-sections (AA\({}^{\prime}\), BEE\({}^{\prime}\)B\({}^{\prime}\), and CDD\({}^{\prime}\)C\({}^{\prime}\)). Then, each cross-section is classified into one of three classes: polygon (if the nodes are in a horizontal polygon of the building, for example BEE\({}^{\prime}\)B\({}^{\prime}\) in Figure 5a), line (if the nodes are connected, for example AA\({}^{\prime}\) in Figure 5a) and point (e.g., a top of a pyramid tower). The generated point set is ordered and saved according to the polygon, therefore, the plane can be recreated from the point set. ```
1 procedureSegmentation(\(CS\))
2 Cross_Sections =[ ]
3 forall\(c\)in\(CS\)do
4 isInserted = False
5 forallcross_section in Cross_Sectionsdo
6 ifisSameHeight(\(c\), cross_section)then
7 insert(cross_section, \(c\))
8 isInserted = True
9 endif
10 endfor
11 ifnotisInsertedthen
12 new_cross_section =[ \(c\)]
13 insert(Cross_Sections, new_cross_section)
14 endif
15 endfor
16 returnCross_Sections
17 endprocedure
```  
**Algorithm 1**Building Segmentation. CLOD generation workflow* Cross-sections that consist of a small line or polygon are removed. The lowest and the highest cross-sections are never removed. * Cross-sections that are large polygons are simplified using [PERSON]'s method [58]. To preserve the building features, such as a vertical wall and a rectangle corner, the points of the merged nodes are selected from the original points belonging to the cross-section and are adjusted to the lower cross-section. The next step is to approximate the cross-sections with a set of rectangles using a method based on Minimum Containing Rectangular (MCR). The MCR is defined as the minimum area rectangle (where the sides in the rectangle are parallel with the axis of the coordinate system) that covers the polygon (in this case the cross-section). To deal with the situation when the polygon is not aligned to the main axes, we rotate the polygon according to each edge so it is aligned to the main axes. After the calculation, it will be rotated back. The original cross-section is represented by a set of MCR. If the area difference between the cross-section and the generated MCR set is larger than the threshold (20% of total area; denoted _min_Area_ in Algorithm 2), the cross-section will be marked as not decomposable and the CLOD will not be generated for the building.