# Scan to BIM Mapping Process Description for Building Representation in 3D GIS
## 5 SBMD Process Framework Design
### Algorithm Model Definition
\begin{table}
\begin{tabular}{c c c} \hline \hline
**No** & **Use Case** & **Algorithm Model** \\ \hline \multirow{8}{*}{U4-4} & \multirow{8}{*}{\begin{tabular}{c} Calculate the ground \\ level of the footprint \\ using DEM \\ \end{tabular} } & There can be various ways to extract the ground level of the footprint. Here, the ground level is defined as the minimum ground z-values where the footprints polygon is offset. The offset distance is entered considering the density of buildings. \\ \cline{1-1}  & & \(ground_{level}=min_{2}\big{(}offset_{footprint,polygon}\big{)}\) \\ \cline{1-1}  & & \(offset_{polggon}\big{(}building_{footprint}\), \(distance\big{)}\) \\ \hline \multirow{8}{*}{U4-5} & \multirow{8}{*}{\begin{tabular}{c} Calculate building roof \\ height using DEM. \\ \end{tabular} } & To calculate the building roof height, shrink the footprint’s polygons with the offset distance. Then, the average z-value of the pixel belonging to the polygon is calculated using DEM. \\ \cline{1-1}  & & \(\text{root}_{height}=\frac{\sum\limits_{i=0}^{K}z_{value}\big{(} shrink_{footprint,polygon}\big{)}}{n}\) \\ \cline{1-1}  & & \(n=\text{count}_{\text{vertex}}\big{(}\text{shrink}_{footprint,polygon} \big{)}\) \\ \cline{1-1}  & & \(\text{shrink}_{footprint,polygon}=offset_{polggon}\big{(}building_{footprint}\), \(distance\big{)}\) \\ \hline \multirow{8}{*}{U4-6} & \multirow{8}{*}{\begin{tabular}{c} Generate building \\ geometries \\ \end{tabular} } & Generate 3D building geometry using the building footprint, roof height, and ground level. \\ \cline{1-1}  & & \(generate_{geometry}\bigg{(}building_{footprints}\), \(root_{height}\), \(ground_{level}\) \\ \hline \multirow{8}{*}{U4-7} & \multirow{8}{*}{\
\begin{tabular}{c} Generate BIM object \\ from geometries. \\ \end{tabular} } & BIM files such as IFC can express object property information. In this case, the building’s area, volume, and center position are calculated as properties and connected to the properties of the building geometry. \\ \cline{1-1}  & & \(\text{BIM}_{\text{object}}=\text{link}_{\text{properties}}\big{(}building_{ geometry}\), \(properties\big{)}\) \\ \cline{1-1}  & & \(\text{properties}=\{\text{area}|volume\ \big{|}center_{position}\}\) \\ \hline \multirow{2}{*}{U4-8} & \multirow{2}{*}{
\begin{tabular}{c} Mapping outputs \\ to GIS \\ \end{tabular} } & Map building Tiff, SHP, and IFC files created from the information calculated in the previous step to GIS. \\ \cline{1-1}  & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._The offset polygon's vertices are used as the basis for sampling the z-value to obtain the \(ground_{level}\). Here, the ground\({}_{\text{level}}\) value around the building may vary according to the offset distance. In a place where the height of terrain changes rapidly or in an environment where buildings are dense, the difference in the ground\({}_{\text{level}}\) value may be considerable depending on the offset distance. This study's offset distance value was three to five times the DEM resolution. Figure 5 shows the process of calculating the ground\({}_{\text{level}}\) of a building. The \(roo\)\(f_{height}\) calculation algorithm is also almost similar to Algorithms 1; the difference is that, instead of the minimum z-value, the z-average value of the shrinking polygon's vertex is calculated. For reference, calculating these values may also vary, depending on the user requirements.