Keywords

1 Introduction

In recent years, China’s smart city construction has been developing rapidly. The corresponding concept of City Information Model (CIM) has also received wide attention since it was proposed. Generally, CIM integrates the concepts of BIM and GIS, and provides a basic platform of data management for the construction of digital twin cities. However, whether it is BIM or GIS, the data objects in its underlying logic are entities, such as buildings, plots, and roads at the city scale, and walls, doors, and windows at the building scale. The organization and management of space-based objects are lacking in all these data models. Among them, the interior spaces are more difficult to handle due to their complexity in terms of location and connectivity on 3D (Becker et al. 2009). The lack of spatial objects has a severe impact on the integrity and adaptability of CIM.

Indoor Geography Markup Language (IndoorGML) is a data format standard proposed by the Open Geospatial Consortium (OGC) for the exchange and representation of indoor spatial data (Kang and Li 2017). IndoorGML divides the building indoor spaces into a set of cellular spaces and expresses the connectivity between these spaces with Node-Relation Graph (NRG). Moreover, IndoorGML can add semantic and geometric information to the model by external linking references. IndoorGML has provided a method to describe interior space objects for CIM (Liu et al. 2017), and has been applied in emergency evacuation (Alattas et al. 2020) and interior navigation (Yang et al. 2021). However, IndoorGML is still at the early stage of development, and the existing generation process is cumbersome and difficult to integrate semantic information (Jeong et al. 2018; Srivastavaa et al. 2018).

According to the shortcomings of the existing generation methods of IndoorGML, this study proposed a BIM-based IndoorGML model generation scheme. The scheme took the typical Revit model as the data base, extracted the location and attribute information of model elements respectively, then generated the topologically expressed NRG model and the solid expressed building model, and finally established the mapping relationship by model element ID to integrate the semantic information. Since different operations were involved, the scheme used a combination of different platforms such as Dynamo and Grasshopper. The study selected a hospital with complex interior spaces as a case study for the generation experiments of IndoorGML model.

This study further calculated complex network-related attributes and analyzed the relationship between interior spaces to explore the application potential of the IndoorGML model. The study analyzed the accessibility of doctor and patient flows separately based on NRG in the IndoorGML model. The result showed that the generation scheme is highly feasible even for large buildings with very complex interior spaces.

2 Method

The BIM-based IndoorGML model generation scheme can be divided into three modules: BIM information extraction, geometric model construction, and semantic information integration. Figure 1 presented the generation scheme.

Fig. 1.
figure 1

The generation scheme of IndoorGML model based on BIM

2.1 BIM Information Extraction

The amount of data in the BIM model is relatively large and not all of the information in the model can be used to create the IndoorGML model, so it is important to identify information needed and extract it from the BIM model. This study uses the Dynamo plugin in Revit as a tool for extracting BIM information.

The IndoorGML model expresses the adjacency and connectivity of the interior spaces, including rooms, corridors, doors, stairs and lifts. These elements can be filtered through the Dynamo plug-in in the Revit model. For each element, the location information is directly exported as a spreadsheet file that would be used to generate the IndoorGML geometry model.

For the semantic information, since IndoorGML supports external references to Industry Foundation Classes (IFC) files, the BIM model can be exported as an IFC file for subsequent external references in IndoorGML. To reduce the amount of arithmetic involved in external referencing, the BIM model should be made lighter by removing unnecessary information.

2.2 Geometric Model Construction

The IndoorGML geometric model includes two parts, one is the topological representation, the NRG model, which corresponds to the multilayeredGraph module in the IndoorGML data, and the other is the solid constraint representation, i.e. the walls, floors and doors, which corresponds to the primalSpaceFeatures module in the IndoorGML data. Both are based on the element location information extracted from the BIM model and generated by the appropriate algorithms.

The NRG model consists of the State and Transition. The State is represented by points that indicate interior spatial units, while the Transition is represented by edges that indicate the connectivity between spatial units. The NRG model expresses only the topological relationships of the interior space without any semantic information. The primalSpaceFeatures can be divided into CellSpace and CellSpaceBoundary.

According to the composition of IndoorGML, it is possible to construct an IndoorGML model by converting the data information derived from the BIM model. However, in larger buildings, it would take a lot of time and effort to manually input the data one by one, so it is necessary to design mapping rules and algorithms to quickly generate IndoorGML standard text data from the extracted BIM data.

IndoorGML content is divided into four main sections, with the data in each section presented in a fixed format. This study uses Python programming to generate IndoorGML text. Taking the State section as an example, after reading the spreadsheet file, each row of data is exported as a piece of texts in IndoorGML text until all the State data has been exported. The output of the other three sections is similar to that of the State section. Once the individual sections of IndoorGML data have been created, the data is merged and the complete IndoorGML model is obtained.

2.3 Semantic Information Integration

The external references in IndoorGML are mainly used for CellSpace and CellSpaceBoundary, which correspond to rooms and doors respectively in the BIM model, and to IFCSpace and IFCDoor respectively in the IFC. Considering that the purpose of the semantic information is to enrich the functional information of the cell spaces, the integration of the BIM room information is mainly carried out for the CellSpace part.

A complete BIM model exports a large amount of IFC files, so the required IFCSpace information needs to be filtered out. The key to referencing external files in IndoorGML is twofold: determining the location and filename of the referenced IFC file, and matching the GUID number of the referenced object in the IFC text with the ID of the object in IndoorGML. The first point is relatively simple, as long as the path name of the IFC file is entered correctly, while the second point requires further processing of the data is required.

In the exported IFC file, each IFCSpace has a unique GUID number and the room name. Each CellSpace in IndoorGML also has a unique ID number. In the previous step, the room name of each CellSpace is obtained through the Dynamo. The room name corresponds to the ID number of the CellSpace. Therefore, using the room name as a medium, the ID number of the CellSpace, the room name and the GUID of the IFCSpace can be related one-to-one to obtain the GUID corresponding to each CellSpace.

Since each CellSpace has one and only one reference object, the pathname of the IFC file and the GUID are input as separate variables to the corresponding location in the IndoorGML text to complete the external reference of the IndoorGML model to the IFC information. After completing the external reference, the IndoorGML model implements the integration of the semantic information.

3 Case Study

Unlike small buildings such as office buildings, the interior space structure of a hospital is more complex, the process of generating the model is more computationally intensive, and the generated network model contains more information, which will effectively test the feasibility of the above IndoorGML generation scheme.

3.1 Hospital BIM Model Data Processing

The BIM model of a hospital was selected as the data source for IndoorGML model generation, and the interior space of the model is shown in Fig. 2. The BIM model was first processed to extract the data information needed to build the IndoorGML model, including information of rooms, corridors, doors, stairs, lifts, etc. The above information was extracted using the Dynamo plugin.

Fig. 2.
figure 2

The BIM model of the hospital

The exported room and corridor information contained room area, number of occupants, heating and cooling loads, etc. To generate the IndoorGML geometry model, the room contour lines were required, and to integrate the semantic information, the room name was required. The extracted door information includes the axis endpoint coordinates and the centre point coordinates, whereas for stairs and lifts only the centre point coordinates were extracted. All of the above information was saved as separate spreadsheet files.

3.2 Hospital IndoorGML Model Generation

To generate the NRG model, the data required included the contour line coordinates of the rooms and corridors and the axis and centre point coordinates of the doors. The room contour coordinates and door centroid coordinates were imported into Grasshopper and the geometric reconstruction of the room contours was completed. Afterwards, the distance from the centre point of each door to the contour line of each group of rooms was calculated, and the relationship between the doors and the rooms was determined. The centre point of the room contour line would be used as the State data in the NRG model, while the line from the centre point of the room to the centre point of the door would be used as the Transition data (Fig. 3).

Fig. 3.
figure 3

The NRG model of the hospital

The data processing for the vertical circulation spaces was similar to that for the room units. After connecting the centre point of the contour line of the stairwell or lift room to the centre point of the corresponding door, it was also necessary to create vertical connections to complete the construction of the NRG model.

After the generation of the multiLayeredGraph part was completed, the primalSpaceFeatures part of the model, i.e. CellSpace and CellSpaceBoundary, could also be generated in Grasshopper. Finally, the multiLayeredGraph and primalSpaceFeatures sections were merged to complete the IndoorGML geometric model. By mapping the GUID of the room in the IFC file and the ID of the CellSpace in the IndoorGML geometric model, the semantic information was integrated into the IndoorGML model. Figure 4 demonstrated the final model in the IndoorGML viewer.

Fig. 4.
figure 4

The IndoorGML model of the hospital displayed in the viewer

4 Semantic Network Analysis of the Hospital IndoorGML Model

The semantic network emphasizes the adjacency of spaces to each other. Based on the information carried in the IndoorGML model, a further scientific and rational evaluation of the neighbourhood relationships in interior spaces can be performed through semantic network analysis.

4.1 Semantic Network Model Construction

In the IndoorGML, the NGR model is an abstract representation of the connectivity of interior space in the form of points and lines. The semantic network model differs from the NRG model in its composition. In spaces separated by doors, the NRG model is composed of cell-door-cell, whereas the network analysis is aimed at spatial cells. Therefore, the NRG model needs to be reconstructed. Figure 5 showed the cell-cell network model.

Fig. 5.
figure 5

Connections between the CellSpaces

The model consists of a number of single straight lines whose endpoints are the centroid coordinates of two adjacent spatial units, and all spatial unit adjacencies can be obtained by node pairs. As each point corresponds to the room name of the spatial unit it represents, the coordinate of the point could be replaced by the room name derived from the semantic information of the IndoorGML model. The connection between all rooms is then obtained.

4.2 Centrality and Modularity Analysis

Centrality and modularity are two common metrics used in Graph Theory, where the former is used to determine the importance of nodes in a network, and the latter is used to identify the association structure of a network. By applying the two metrics to the semantic network analysis of indoor spaces, the weight of different spaces in the neighbourhood and the grouping of spaces with similar neighbourhoods can be obtained respectively.

Gephi is a complex network analysis software that allows to quickly build semantic networks and perform exploratory data analysis, link analysis, social network analysis, and many other types of network analysis. In this study, Gephi was used to calculate the centrality and modularity of the sematic network model of the hospital. The calculated results were fed back into the external reference model of the IndoorGML to improve the sematic information. Figure 6 presented the centrality and modularity calculations of the hospital.

Fig. 6.
figure 6

The centrality (left) and the modularity (right) of the hospital

The results of the centrality calculations showed that the core traffic space has the highest centrality among the functional spaces of the hospital, followed by the nurses’ station and its associated waiting area, and then by hospital-specific functional spaces such as CT rooms and ultrasound rooms, while offices, duty rooms and tool rooms are less centrally located, and the least centrally located spaces are toilets, dressing rooms, medicine storage and equipment rooms.

The results of the modularity calculation divided the hospital into 17 groups, where spaces with similar functions and in the same functional division were mostly in the same group, consistent with design experience. There were also some exceptionally small groups that were not functionally zoned properly. From a modularity perspective, there is potential for improvement in the design of these spaces in terms of their connectivity to the surrounding spaces.

4.3 Flow Paths Analysis

The design of flow paths is an important part of architectural design, especially in hospital design, including the separation of patients and doctors and the separation of cleaning and sewage. The flow paths determined the accessibility of the rooms. To facilitate the classification of the flow types of the paths in the NRG model, the properties of the different spaces were determined according to their function. The lines in the patient's accessible space were extracted to form the patient flow paths. The lines in the doctor's workspace were extracted to form the doctor's flow paths. In addition, the results of the corresponding network analysis could be assigned to the IndoorGML model.

Figure 7 presented the accessibility of the flow paths for the patients and doctors. The most accessible patient paths passed by the nurses’ stations and the medical and technical areas, while the more accessible doctor paths passed by the medical and surgical areas. Such analysis and visualization could help to evaluate the interior spaces design from the perspective of different user groups.

Fig. 7.
figure 7

Accessibility of the patient paths (left) and the doctor paths (right)

5 Conclusion and Discussion

Indoor spatial data is an important part of building CIM in the future, and constructing a digital model of indoor space can provide an effective management tool for spatial data. This study proposed a scheme for the generation of BIM-based IndoorGML models. And with the generated models, the analysis of spatial connectivity and accessibility in IndoorGML models was also explored.

Using a hospital as a case study, this study validated the effectiveness of the generative scheme. Despite involving the combined use of multiple software platforms, the final generated IndoorGML model fully represented the geometric information of the interior space and the corresponding attribute information. Moreover, through network analysis, the model also demonstrated the centrality and modularity of the hospital interior space, as well as the different flow of patients and doctors. The result showed that the generation scheme is highly feasible even for large buildings with very complex interior spaces.

This study is still at a preliminary stage. The use of multiple software in the operation to reduce programming work made the whole process still cumbersome. Simplification of the operational steps will be considered to avoid the involvement of multiple software. In addition, the IndoorGML model needs to be further explored with its application in interior spatial analysis as well as in CIM platforms.