# Methodology for the Efficient Progressive Distribution and Visualization of 3D Building Objects
## 3 Methodology
### Prototype Extraction and Classification  
The CSG representation is generated from the cross-sections using a symbolization method. One example is provided in Figure 5 where the building is replaced by a combination of a box and a triangular prism (Figure 5c). The symbolization method works as shown in Algorithm 4 in which the input is decomposed rectangular parts and the output is the detected set of prototypes.  
```
1 procedurePrototype(CS_parts)
2 results=[]
3 part_org=CS_parts
4 whilenotEmpty(part_org)do
5\(p\) = delete(parts_org)
6 proto_parts=selectTop(\(p\), CS_parts)
7 proto=generateProto(proto_parts)
8 insert(result, proto)
9 endwhile
10 returnresult
11 endprocedure
```  
**Algorithm 4**Prototype Extraction  
First, mark all cross-section parts (CS_parts) as non-processed (Parts_org). Select p from the non-processed list Parts_org and remove p from it.  
Then, select the proto parts from the cross-section parts (CS_parts) that have the closest higher z value and can be vertically projected into p (selectTop function). For example, in Figure 5, the proto parts results of the cross-section part CDD/C' is BEE'B' and the selected results of BEE'B' is AA'.  
Finally, for different proto parts, generate the representation respectively. Currently, we implement box (two identical rectangles of different heights), gabled roof (one line and one rectangle of the same length), hip roof (rectangle with a shorter line), and tower (one point and one rectangle). The prototype can be extended in further applications to support more CSG geometries.  
If the rectangular parts are not the same for the two cross-sections, the situation becomes more complicated; typical examples are the roofs. To represent as many roofs as possible with a limited number of geometric prototypes, the roofs can be separated into more primary parts using the standard geometries in Figure 1. By combining and transforming these geometries, we can construct a large proportion of the common roof structures. However, in many cases, it requires several geometries. If, for example, the basic geometric prototypes in Figure 1 are used, a gabled roof can be typified using one triangular prism and four rectangular pyramids. To avoid this large number of geometries in our study, we define a prototype for a gabled roof structure which enables us to model such a roof with only one prototype. The disadvantage of this is that a prototype definition has to be created and also several transformation parameters have to be handled. But in these cases where a geometry is very common, such as gabled roofs, this is often more efficient. Currently, the prototype is defined by hand, based on the experiences of the 3D city model maker. If the geometry cannot be typified, this part will be represented by a polygon.  
When the prototypes are created, they are classified into levels (see Section 3.1). The box created by the largest MCR (denoted main MCR) of the first cross-section is classified as level 1 (LOD0). The roof prototypes (defined by hand) are classified as level 2. Finally, the remaining prototypes are classified as either level 3 or 4 depending on their sizes (and possibly also building type).