Introduction

The real world objects as we perceive are in three dimensions (3D). It is desirable to have a system which stores, manipulates, and analyses the information regarding real world objects in 3D (Abdul-Rahman and Pilouk 2007). Traditional maps used 2D or 2.5D to display the information which lacked the spatial information of the third dimension. 3D GIS covers this aspect of the 3D by adding z coordinates (i.e. 3D spatial information) to the data. Various approaches and methods have been proposed by researchers to support 3D data acquisition, modelling, storage, visualization, and querying (Zlatanova and Tempfli 2000; Köninger and Bartel 1998; Lee and Zlatanova 2008). The framework by (Köninger and Bartel 1998) described geometric and semantic modelling of 3D objects in a hierarchical structure known as Level of Detail (LOD). The LODs can be categorized as shown in Table 1 (Gröger et al. 2012). Figure 1 shows the different LODs of the same building.

Table 1 Description of Levels of Detail
Fig. 1
figure 1

Different levels of detail of a building

The usage of LOD facilitated the multi-scale representation of 3D city models in CityGML (Coors and Flick 1998; Kolbe 2009; Köninger and Bartel 1998). CityGML is an open data model and XML-based format for the storage and exchange of virtual 3D city models (Gröger et al. 2012). CityGML defines the semantic, geometric, and topological aspects of the primary entity, attribute, and relation of 3D city models (Kolbe 2009). This coherence ensures seamless interoperability among software packages and for the reuse of the same data by different organizations in their respective application fields.

CityGML provides a data model for storage and exchange of virtual 3D city models which supports particular themes viz. buildings, tunnels, bridges, land use, vegetation, water bodies, city furniture, and transportation facility. However, it does not support energy, noise, or indoor data model or schema.To overcome this limitation, there is a provision for extension of the schema known as Application Domain Extensions (ADEs). ADEs extend the existing classes in CityGML and modify them according to user’s application requirement. Hence, seamless integration of various elements and themes becomes possible (Gröger et al. 2012). Using this ADE concept, many ADEs have been proposed which target on specific themes such as noise, energy, solar radiations, etc. Apart from these themes, there is a requirement of precise positioning inside a building during various emergency situations, such as building fire, earthquakes, or terrorist attacks. Currently, an ADE for indoor routing and positioning does not exists.

An attempt has been made through this research to develop the CityGML ADE, which will incorporate routing and positioning attributes in the CityGML data. This ADE will integrate the LOD4 model of a building with the indoor positioning and the route network on which the position of various Wi-Fi enabled devices could be located inside the building and routes could be displayed for navigation using Wi-Fi based positioning. The CityGML ADE needs to inherit the existing classes of the CityGML schema and add necessary and required attributes into the classes. To determine the attributes, a use case was designed. This use case helped to perform indoor routing and positioning and also to formulate attributes for the ADE. So, when a 3D model is stored according to this ADE schema, the routing and positioning information is also stored in the data model, enabling the users to perform indoor navigation.

Related Studies

Many researchers have proposed their own CityGML ADEs according to their applications. We have studied their works to understand the concept of ADEs and its development. Some of the studies are described as follows. Noise ADE was created to store attributes of noise emissions on the buildings. It contained the characteristics like noise coming from the roads, trains or bridges, peak noise level during day and night, etc. (Gröger et al. 2012). Noise ADE was used to map the noise emission levels of the roads, railways, airports, etc. using the CityGML ADE concept (Czerwinski et al. 2007). This ADE contains various parameters such as the amount of noise reflection from the building, the maximum noise in decibels that fall on the building, the minimum noise in decibels that fall on the building, both the previous values are in day, as well as, night, and so on. There is also the road noise module which takes the noise from the road into consideration, the city furniture which acts as noise barriers are also considered. The noise from trains has a module having attributes about that noise. The Computer Aided Facility Management ADE (CAFM ADE) provides the schema for the facility management of the buildings and other places. This ADE helps define the façade of the buildings which can be useful for the variouspurposes, such as, window cleaning, glass window maintenance, etc. It also represents the material with which the façade is made of, and also, its surface area (Moshrefzadeh et al. 2015). The CAFM ADE stores information about the façade and its materials and is a sub-class to AbstractBoundarySurface module.

Energy ADE is an extension which marks the key indicators that link the energy consumption that occurs in a building. It is a subclass to the module Building in CityGML schema (Krüger and Kolbe 2012). An ADE which concentrates specifically on solar energy estimation for buildings is proposed (Wate and Saran 2015).This study designed an ADE, which uses the effective area of a building exposed to sunlight and the amount of solar radiation as key indicators for solar energy estimation(Wate and Saran 2015). UtilityNetwork ADE provides a schema to map and model the utility networks present in the city inside CityGML. This ADE embeds the 3D utility network model into a 3D city model and provides a means to represent 3D pipes and channels with the citymodel(Becker et al. 2011). UtilityNetworkADE contains various networks such as gas networks, electrical power networks, waste water network, fresh water network, etc. The Building feature in CityGML covers the building furniture, boundaries, and rooms, but it does not include the schematics of the indoor space. So, it needs a module extension which manages the indoor space including the floor plans and the indoor infrastructure (Kim et al. 2013). Also, every floor of a building may have different floor plans. So, floor definition is required to include the particular floor with the other attributes.

Additionally, we have referred to literature to understand the notion of indoor routing and positioning. (Lee 2004) implemented 3D Indoor Geo Coding technique in which the street network and the connectivity between the different routes are formed into a 3D Geometric Data Model. This data model is then used to calculate the optimal route to reach any desired location. The authors of (Hagedorn et al. 2009) showed indoor routing using the Building module of CityGML 2.0. They defined two classes, which inherited from the BuildingObjects module. These classes were defined to connect the BuildingObjects, like stairs and lifts, with the paths. So, ConnectionPoints and Connections classes were made to reference from the BuildingObjects module. ConnectionPoints could be inside the space or outside, whereas the Connections class connects the outdoor navigation and transportation system. In this way, the authors of (Hagedorn et al. 2009) created a visualization of indoor routing. Among various network routing creation alternatives such as OpenStreetMaps, Smartphones GPS applications, ArcGIS, etc., ArcGIS provides an excellent platform for the purpose, as rest of the choices had some limitations (Prasad 2013). Also, the indoor routing done by the author in (Martí 2013) suggested that ArcScene could be used for the purpose of routing using the model builder tool in the software.

There are different techniques and systems for indoor positioning such as Wi-Fi, RFID, Bluetooth, etc. as GPS signals deteriorate inside buildings. A survey was performed (Liu et al. 2007; Gu et al. 2009)of systems and solutions for the indoor positioning. They used RFID, cellular networks, WLAN, etc., for the wireless signals and algorithms such as k-NN (Nearest Neighbour), probabilistic, least square, etc., for localization. Various comparisons algorithms are made by (Cypriani et al. 2010) divided mainly into two categories, i.e., propagation models and signal strength maps. Propagation models calculate the distance between known signal transmitters and signal receivers (unknown) and signal strength map matches the current signal strength to the previously assigned signal strengths of all the places. (Evennou and Marx 2006) also used signal strength and propagation model for indoor mobile positioning with advanced integration of Wi-Fi and Inertial Navigation Systems. They fused the information from the Wi-Fi network with that of from inertial navigation sensors which increased the accuracy of the measurements.

Fig. 2
figure 2

Study area

Study Area and Dataset

The area under this study is chosen as Indian Institute of Remote Sensing, Indian Space Research Organization, Dehradun, India (Fig. 2). This region is located in a spread of 78°02″35.56″ to 78°02″52.224″ East and 30°20″23.0784″ to 30°20″29.8104″ North. The dataset used in the study are the 3D Collada models of the campus buildings mentioned in Table 2.

Table 2 Buildings used in dataset

Methodology

Our aim was to design a CityGML ADE for indoor routing and positioning. To achieve this, we needed to add attributes and extend the existing classes of CityGML. To determine the attributes, we designed a use case for indoor routing and positioning. Figure 3 shows the use case diagram. The actors at hand are the 3D model designer, system, and the user. 3D model designer creates the 3D model, the Network dataset which includes the obstacles, and also added the Wi-Fi router positions into the 3D building model. The system does the Network Analysis on the Network Dataset and the starting and ending points provided by the user. An output of the shortest route is calculated by the system and displayed to the user. Furthermore, the Received Signal Strength (RSS) from all the Wi-Fi routers are converted into distances which in turn are used as radii for the buffer creation from each of the router positions. All the buffers are intersected by the system, and the output positionis displayed to the user. Using this use case, we performed 3D modelling, indoor routing, and positioning which further allowed us to verify the attributes needed for the development of the ADE. Figure 4 shows the flowchart of the method that is followed for the abovementioned purpose.

Fig. 3
figure 3

Use case for indoor routing

Fig. 4
figure 4

Core methodology flowchart

The first phase (A), as seen in Fig. 4, was to create 3D visual models, which is utilized for the 3D representation and data storage of the buildings. The second phase (B) was two folds; one, to establish a network dataset (3D) around and inside the buildings so as to facilitate the routing inside the campus and second, to perform indoor positioning. The third phase (C) was to design the CityGML ADE using the attributes. All three phases, with their individual flowcharts, are explained respectively in the following sections.

Building Model (3D)

We have used Trimble SketchUp to create 3D models out of many available software packages like 3ds Max, AutoCAD, etc. because of its simplicity, flexibility, and scalability (Xu et al. 2009). A building footprint and its dimensions are required to create its 3D model. Figure 5a shows the footprints of the buildings used in the study. Building dimensions were determined using a LASER Distance Meter. These measurements were used to create the 3D building models. These 3D models were used for visualisation of the routes and positions acquired.

Fig. 5
figure 5

a Footprints of buildings b LOD4 cross-sectional view of a building

Figure 5b shows the wallSurface, door, window and some of the intBuildingInstallations inside one of the buildings. Necessary attributes were added to the 3D model according to CityGML OGC standards, and the model was converted to CityGML data which can be visualized in a software package called FZKViewer. After the modelling of 3D models, network datasets were created on top of these 3D building models for the routing.

Network Routing and Indoor Positioning

Network Routing

For the routing, a network dataset was created to represent the routes and stairs. We used Network Analyst of ArcGIS to perform routing which uses Dijkstra’s algorithm to calculate the shortest route. To automate this routing, a model was created using ArcGIS Model Builder, which took the network dataset and the start and end locations as input and gave the route between those locations as output. The model is depicted in Fig. 6. Then the next phase was to locate the user inside the building for which, Wi-Fi routers were installed.

Fig. 6
figure 6

Routing model made in ArcMap

Indoor Positioning

The positions of the Wi-Fi routers were added into the 3D building models. A python program continuously read the signal strengths of all the routers and converted it into distances corresponding to each router. The conversion is done using Eq. (1) as mentioned by (Rappaport 1996).

$$ PL\left( {dB} \right) = PL\left( {d_{0} } \right) + 10n\;{ \log }\left( {\frac{d}{{d_{0} }}} \right) + X_{\sigma } $$
(1)

where, PL (dB) = Received Signal Strength at distance d, PL (d0) = Received Signal Strength at distance d0, n = Path loss exponent, d = distance, d0 = 1 Meter, \( X_{\sigma } \) = Random Normal Variable.

The path loss exponent, represented by ‘n’, was calculated by repeatedly measuring Received Signal Strength (RSS) at few already known distances (d). A total of ten values each of PL (d0) and PL (dB) (at d = 6 m) were taken for each router at different distances and value of n was calculated using those values and then average of all the values of n was taken (Figs. 7, 8).

Fig. 7
figure 7

Graph for the various values taken for a PL(do) b PL(dB)

Fig. 8
figure 8

Graph for the calculated values of n

The average of the n values came out to be 2.708. Once we have calculated the path loss exponent (n), we can calculate the distance by rearranging Eq. (1) as follows:

$$ d = 10^{{\left( {\frac{{{\text{PL}}\left( {\text{dB}} \right) - {\text{PL}}\left( {d_{0} } \right) - X_{\sigma } }}{{10{\text{n}}}}} \right)}} $$
(2)

The buffers were created for each Wi-Fi router by taking the calculated distance as the radius. To achieve the positional accuracy, the buffers are intersected with each other (Ting et al. 2011). The final intersected buffer gives the position which is visualized in Google Earth. After the 3D models, routing, and positioning, the attributes for the CityGML ADE were decided in the next phase and then the ADE schema was proposed.

CityGML ADE

OGC Best Practice describes the creation of ADE and its application schema for IMGeo ADE (Van den Brink et al. 2012). The methodology stated by the authors in (Van den Brink et al. 2012) were used as guidelines for the designing of the indoor routing and positioning ADE. CityGML Schema was recreated in a UML modelling tool, Enterprise Architect. CityGML classes were extended using the attributes determined for indoor routing and positioning. The classes which could be directly linked to the CityGML classes were joined and were given the stereotype as ≪ADEElement≫. The classes of the indoor model, which could not be directly linked, were given the stereotype as ≪Feature Type≫ and then linked to the CityGML classes. Hereafter, the ADE application schema was then converted to GML application schema using a UML to GML converter tool UML Model Transformation Tool (UMT) which is used to transform and generate code in the form of XMI (Oldevik 2004).

Results and Discussion

This study presented the design of the CityGML ADE for indoor routing and positioning. It includes 3D modeling, 3D indoor/outdoor routing, 3D indoor positioning, and the creation of GML application schema. Figure 9 shows the 3D model of the campus buildings made in the SketchUp software. These models were then used as a base upon which network datasets were created.

Fig. 9
figure 9

Complete SketchUp model of the study area

Various start and end locations were given to the routing model as input. As an example, various instances were taken such as routing between two rooms in the same floor Fig. 10a, routing between two floors in the same building Fig. 10b, and lastly between two rooms in different buildings Fig. 10c. Starting and ending points are shown in green and red flag respectively. Similarly, this model builder can solve the route between any two or more locations. The usage of Dijkstra’s algorithm gives the shortest route possible.

Fig. 10
figure 10

3D route and 3D model visualization between various source and destination points

Figure 11 shows the output of Indoor Positioning. Figure 11a is the top view of the position and Fig. 11b is the side view of the position. The transparency is added to the 3D building models in the outputs of both indoor routing and positioning for better visualization. The accuracy of the positions given by the Wi-Fi routers varied with different instances in a range of 0.3 to 0.7 m. These interferences could be reduced with the proper placement of the Wi-Fi devices so that the accuracy increases. This would require the attenuation factors of the objects present in the room which could be incorporated to eliminate the errors in the position. RFID technology could also be used, which has a very high accuracy and high cost, compared to Wi-Fi technology. However, the technology or the accuracy would not have affected the attributes that were needed to be included in the ADE. So, to reduce the cost of the research, Wi-Fi technology was used.

Fig. 11
figure 11

Indoor positions, a Top view b side view

The final step was to design a CityGML ADE, which would fulfil the data model requirements of the storage of 3D virtual cities. This ADE will facilitate the users to store and exchange the 3D building data with other users or organizations which will be equipped for the indoor routing and positioning purpose. Figure 12 shows the UML class diagram of the Indoor Routing and Positioning ADE. The silver classes are existing classes of CityGML, whereas, the yellow ones are the extended classes for the ADE. ‘BuildingInstallation’, ‘FloorSurface’, and ‘BuildingFurniture’ classes are extended to incorporate the routing and positioning attributes. A class extends ‘BuildingInstallation’ and has characteristics of the type of connectors of the floors of any building. The ADE class is then specialized into ‘Wi-Fi’, ‘Elevator’, ‘Staircase’, ‘Escalator’, and ‘Ramp’. Each class except the Wi-Fi class, comprises of the floors that each one of them connects, whereas the Wi-Fi class comprises of the Wi-Fi routers installed in the building, their ID, their required exponents, and constants. However, the classes also have some other attributes such as ‘maxCapacity’, which will tell the maximum capacity of the ‘Elevator’, ‘slope’ attribute of the ramp class will give the slope of the ramp, etc. Another class extends the ‘FloorSurface’ class of CityGML building schema. It contains the type of path which is present in the building, i.e., walkable or drivable path, each having parameters as the length and width. The ‘BuildingFurniture’ class is also extended. This class will inform about the obstacles present in the paths and whether it is removable or not with the help of ‘obstacleType’, and ‘removable’ parameters respectively. Now, the 3D CityGML data which has all the parameters associated with the routing and positioning ADE schema can be used for the required purpose, and is also available as an interchangeableformat for the exchange of 3D spatial data among users.

Fig. 12
figure 12

Class diagram of the proposed indoor routing and positioning ADE

Fig. 13
figure 13

Semantic information in the 3D building model

After the creation of the CityGML ADE application schema, an instance diagram was designed which is shown in Fig. 14. An instance of Building ‘bldg’ is shown to have an attribute named function which is assigned the value as ‘educational’, depicting that the function of the building is education. The Building instance consists of an instance ofAbstractBuildingType named ‘Abt1’ which is of LOD1 Solid type. This instanceis further decomposed into Room, SurfacePropertyType, and BuildingInstallation. Room contains BuildingFurniture whereas BuildingInstallation consists of floorConnectors. An instance of BuildingFurniture is further decomposed into Obstacles. On the other hand, floorConnectors has stairs instance. Both these instances are of LOD4 type. SurfacePropertyType has a subclass FloorSurface, which contains paths as an instance. Paths hasbeen decomposed into a walkablePath instance. Overall, an instance of a building model is being depicted in the diagram. One instance of stairs can be seen in the 3D CityGML building model in Fig. 13.

Fig. 14
figure 14

UML instance diagram of a part of CityGML building model with indoor routing and positioning ADE

Conclusion and Recommendations

In this study, we proposed an ADE for indoor routing and positioning using the OGC standard CityGML which is used for storage and exchange of 3D city models. In this ADE, we extended some of the existing classes of CityGML to include the attributes which will help to store the data regarding routing and positioning inside the building. These attributes were adopted after the design of use case and then performing indoor routing and positioning. Besides extending the model of CityGML, we also modeled the buildings of the study area in LOD3 and LOD4, created the network dataset of paths and staircases, and visualized the routes and position of the Wi-Fi enabled device in 3D building models. This methodology could also be extended to any other study area if they have the footprints and dimensions of the buildings, and also Wi-Fi routers.

We faced some challenges during the indoor positioning where the deviation in the Received Signal Strength was increasing with the abrupt increase or decrease in population in the room. This deviation is due to the human interaction with the signal transmission. It can be overcome by installing Wi-Fi routers high up the walls or even on the ceilings so that human interaction could be minimized. A module for alternate route estimation via escalator, elevator or ramp can be designed to facilitate routing in case of emergency situations or in need. This alternate route estimation can be useful in avoiding sensitive routes for ordinary citizens.