LINKING 3 D BUILDING MODELS , MAPS AND ENERGY-RELATED DATA IN A WEB-BASED VISUALIZATION SYSTEM

In a transformation process to become a climate-neutral city campus, universities have to deal with the sustainable concept. Since ”human factor” plays a significant role in the transformation process, providing easy access to environmental data to influence building occupants’ behavior is essential. By utilizing energy-related data without spatial attribute and existing building geospatial data, data visualization in a web browser can be established for both 2D and 3D platforms. Our implementation presents a visualization of indoor sensor measurement data, where the same geospatial data can be used for both 2D and 3D visualizations even though the 3D platform needs an adjustment. Our approach results in a monitoring tool prototype based on visualization of indoor sensors measurement data, which can be accessed easily in a web browser by all building occupants.


INTRODUCTION
In order to deal with a sustainable future, nowadays numerous higher institutions around the world aim to become climate neutral universities, which means they want to have a net zero carbon dioxide emissions.A recent study (Udas et al., 2018) mentions 600 universities in the USA have been committed to becoming carbon-neutral universities since 2009, and most of them have set a specific emission reduction target to be achieved by 2020.The study also mentions that in Germany, the Environment Campus of Birkenfeld, the Leuphana University of Lueneburg and the University of Applied Sciences for Sustainable Development Eberswalde are already carbon-neutral.Becoming a carbon-neutral university can be achieved by running a transdisciplinary research project addressing various sustainable concepts which includes relevant internal and external stakeholders' factors such as redevelopment strategy to ensure energy efficient campus building, integration of renewable energies, new financing model, and also human behavior inside the buildings.
Recent studies in (Delzendeh et al., 2017) and in (Hong et al., 2017) have shown that occupants' behavior within a building plays a critical role in energy saving, but is often oversimplified or not taken into account.Earlier, Janda (Janda, 2011) revealed that architectural solutions are necessary but not sufficient to face climate change.The study also stated that awareness-raising, education and providing feedback on energy use could help occupants to adjust their behavior to reduce power consumption.
In our case, energy-related information is accessible to limited groups of people, mainly those who work directly with the data, but not to the largest group of the building occupants, the students.Therefore, as part of the effort to raise awareness of energy consumption and to bring positive influence, a web-based data visualization was created as the Living Lab web platform to make energy-related sensor data available to all groups of building occupants such as lecturers, staff members, and students.The platform provides the students, as well as staff members of the University, access to the historical sensor data which they can use for further research in energy-related projects.
Coors (Coors et al., 2016) has shown the first prototype of Liv-ing Lab web platform, which provides information about environmental aspects that was collected by building occupants using an Android mobile application.This information then can be displayed on a web-based map later on.The aim of this paper is to summarize indoor visualization of the sensors which do not have spatial attributes inside university building for both 2D and 3D visualizations in a web browser using the Living Lab web platform prototype as the foundation.We describe how the energyrelated information, 2D map, and 3D models have been integrated together within a web platform to visualize energy-related measurement data and also sensors' location so that the building occupants can be informed.This has been carried out within our research with a final aim of raising energy consumption awareness.
This paper is structured as follows.In section 2, recent related works are addressed.Section 3 explains the proposed approach to achieve the objective of this paper, while section 4 presents the implementation of the proposed approach.The result is discussed and concluded in section 5.

RELATED WORKS
Data visualization is essential for presenting important information.It can be used as an interface between the user and the data so that the data can be understood and accessed easily.In geospatial visualization, maps are used to refer to an object's location since they help the viewers to better understand the spatial relationship.Nowadays, displaying maps in a web browser can be implemented relatively easy by utilizing map libraries, such as OpenLayers (OpenLayers, 2018) and LeafletJS (Agafonkin, 2018) for 2D maps and CesiumJS (Cesium, 2018a) for 3D virtual globes.These map libraries enable web-based maps to be more accessible, interactive and capable of delivering more information.
Several works on web-based 2D campus visualization are presented in (GIScience Group, 2018) and (Gomogi, 2018).While these works already utilized spatial data to overlay floor plans, the indoor map library used in (GIScience Group, 2018) is already obsoleted (OpenStreetMap, 2018) and the mapping concept in (Gomogi, 2018) is not disclosed.Alternatively, several indoor mapping studies use Scalable Vector Graphics (SVG) to draw a floor plan on top of the map as in (Ohrt and Turau, 2013) and (Wijewardena et al., 2016).While this alternative gives a convincing result in terms of user-friendly access, it does not focus on spatial visualization issue.
On the 3D platform, Web Graphics Library (WebGL) is becoming standard for 3D visualization in a web browser.It is a cross-platform web standard for rendering interactive 2D and 3D graphics in a compatible web browser without requiring plug-ins (Khronos Group, 2018).A study comparing X3DOM, three.js,and CesiumJS as an open-source We-bGL framework (Krämer and Gutbell, 2015) concludes that each framework has its own approach and goal, yet among those 3 frameworks CesiumJS is the only framework with direct support for geospatial coordinates.
OpenWebGlobe is another open-source WebGL framework, developed by a University in Switzerland for visualizing geospatial data in a 3D virtual globe.However, when we worked on our research, its service was not available due to functionality extension (Christen, 2016).

PROPOSED APPROACH
As we aim to implement the visualization in both 2D and 3D platforms, we propose an approach that separates the data source and the visualization in a web browser in order to have the flexibility in managing these two aspects so they can be improved independently.The proposed system architecture (figure 1) consists of three main parts namely Data Source, Web Server, and Data Visualization in client-side.

Data Source
This part contains energy-related and building-related data which will eventually be visualized as valuable information.The energy-related data recorded by a sensor over time is stored in an Internal Sensor Service, while the building-related data is stored in a separated database.
For storing and providing access to the energy-related data, instead of utilizing Open Geospatial Consortium (OGC) standard service like SensorThingsAPI (Liang et al., 2016) or 52 • North SOS (52 • North GmbH, 2018), we utilized our existing Internal Sensor Service.The service complements the previously mentioned OGC standard service by enabling us to carry out data aggregation (Santhanavanich, 2018).The recorded data includes the sensor's name, a unit of measurement and the measured value within a particular time interval.For example, the temperature of a room is measured every one minute in • C or a heater must be controlled every one minute to check whether it is turned on or off.Details of the Internal Sensor Service (HFT Stuttgart, 2016) are outside the scope of this paper.
The building database stores spatial and non-spatial building data.Spatial data consist of floor's and room's multipolygon coordinates, while non-spatial data consist of room number and name, the building and floor on which the room is located, and which sensor is mounted in a particular room.

Linking the Data in Web Server
This part links the data source and the visualization in the web browser.In our case, the sensors are not equipped with a positioning sensor.Therefore, they do not have a spatial attribute which is essential for locating the sensor in a particular coordinate for a visualization.However, each sensor is mounted inside a particular room of the university building which has a multipolygon geometry attribute in building database.
For visualization purpose, we assume each sensor is placed at the center of its respective room.A room center coordinate can be obtained by calculating the center of room's multipolygon.By pulling the sensor and building data from both data sources and then linking each sensor and the room center coordinate where it is mounted, a sensor is attributed with a spatial value from which it is also possible to access its measurement data.

Data Visualization in the Web Browser
The visualization transforms the sensor's measurements and its associated coordinate into visual information in the client-side.As illustrated in figure 2, in 2D visualization each room in each floor is visualized with a floor plan layer on top of a base map, followed by a sensor layer where each sensor is placed in the 2D coordinate of its associated room's multipolygon center. of a 3D map (figure 3).Since the coordinates for placing a sensor is defined in 2D, they need to be adjusted to fit into the 3D model by adding an altitude value into the coordinates.A sensor's altitude value can be defined manually according to a particular floor where the sensor is mounted.

IMPLEMENTATION
We implemented our concept in one test building which consists of five floors, including a basement floor.On each floor, except in the basement, several rooms have a room temperature sensor mounted inside.The 3D model we used for the 3D visualization consists of four floors without a basement floor.The implemented platform is a website which can be accessed by all building occupants.
Building database was implemented using PostgreSQL (Post-greSQL, 2018) and extended with PostGIS (PostGIS, 2018a) to add spatial support.The measured data were taken from room temperature sensors.On the server side, Node.js (NodeJS, 2018) was employed for the web server implementation.The visualization on the client side was implemented using Javascript and LeafletJS for the 2D platform and CesiumJS for the 3D platform.
To plot the sensor measurement from time to time on a graphic, Highchart (Highsoft, 2018) was utilized.

Data Preparation
As mentioned in section 1, the visualization in this paper is based on the Living Lab web platform prototype, in which collected environmental aspects are displayed on a web-based map with floor plans on top of it by utilizing LeafletJS.These already implemented map and floor plans are sufficient to be used further for energy-related data visualization, rather than experimenting with another 2D map visualization platform.
The test building 3D models consist of the ground floor, first floor, second floor and third floor.Each floor is a single 3D model that has its own interior structures including stairs (Figure 4).These 3D models were prepared in X3D format, which is not supported by CesiumJS.However, Cesium provides a tool to convert COL-LADA(.dae)models or OBJ models to glTF for use with Cesium (Cesium, 2018b).Therefore, Blender (Blender Foundation, 2018) was used to convert the X3D test building model to OBJ format prior to glTF conversion.
The energy-related data used in this implementation is the historical hourly room temperature measurement in • C, which ranged from 1st of January 2016 to 30th of November 20016.This data is stored in CSV format and must be uploaded to the Internal Sensor Service in advance before doing the visualization.

Spatial Attribute Visualization
Each sensor is associated with a room's multipolygon center coordinate so that it can be located on a map.Obtaining the coordinate was achieved using the ST Centroid PostGIS function, which computes and returns the geometric center of a geometry (PostGIS, 2018b).This calculation was done on the web server and the value is pushed to the client side in GeoJSON format.As pictured in figure 5, small circles were drawn to mark the sensor's location on the map.
On the 3D platform, we transformed our glTF 3D model manually through several tests until the desired scale, rotation and translation values were achieved.Altitude value was set to 0 since the Cesium globe was used without a 3D terrain model in this implementation.Each floor of the building was added to the scene separately so that it could be handled independently.Figure 7 shows the whole test building with the first floor not visible to users.The Script below shows how we added and adjusted the 3D model on CesiumJS: entities.add({id: 'bau2_og2', position : (CENTRE_LON, CENTRE_LAT, 0), orientation: ROTATION_VALUE, model : { uri : 'bau_2_2.gltf',scale: SCALE_VALUE } }); To visualize the sensors, sphere objects were used to mark the sensors inside the building (figure 4).These sphere objects were added separately using the same approach as was used with the 3D model.A specific rotation value is not needed in this case since it does not impact the appearance of the sphere.The values of longitude (CENTRE LON) and latitude (CENTRE LAT) were obtained using the same method as in 2D visualization.The altitude value for each sensor was defined manually by considering its respective floor location.

Visualizing and Downloading the Data
Plotting the sensor measurement data on a graph was implemented by pulling the data from the Internal Sensor Service through the web server using web service GET request based on user selection.The data then can be downloaded in two different formats, CSV or JSON, and used for further energy-related projects.Figure 6 and figure 7 show the implementation of sensor data download procedure in a map and a 3D model, respectively.Figure 6 also shows the visualization of room temperature measurement in three different rooms during the same time interval.

DISCUSSION AND CONCLUSION
This paper presents a web-based 2D and 3D visualization of sensors mounted inside a building and their respective measurement over time.Each sensor was linked to a room in which it is mounted, to provide the sensor a coordinate required for visualization using maps or 3D models.The visualization was done as part of an effort to make energy-related data available to all building occupants in order to raise energy consumption awareness.
As expected, our experiment showed that indoor sensors without built-in spatial attribute could be correctly located in which they are mounted on both 2D and 3D platforms.Along with the exact location, the sensor measurement data can be made available to all building occupants.Furthermore, building occupants can define the time interval to download the data according to their needs.Based on our experiment, we feel strongly that it is also possible to apply the same approach to another sensors and devices in the university for localization so that a specific room usage can be optimized to ensure energy efficiency.
The original X3D test building model used in the implementation is not georeferenced.Thus, it was quite impractical to integrate the 3D model with obtaining the correct transformation value must be done manually through several experiments until the desired transformation value is achieved.We believe that georeferencing the 3D building model in advance would be needed to eliminate the manual transformation adjustment.To further our research, we plan to extend our approach by using CityGML Level of Detail (LOD) 4 as the 3D model so that a broader area can be taken into consideration while ensuring the georeference of the 3D building model at the same time.
This paper has not confirmed whether or not the presented energy-related visualization impacts building occupants' behavior.A further study needs to be conducted to understand to what extent the presented visualization concept can raise the awareness.Nevertheless, the approach described in this paper has successfully visualized energy-related sensors which do not have a spatial attribute using a map and a 3D model and also displayed sensors measurement data from time to time in both platforms.Therefore, the platform presented in this paper has the potential to be used as an energy-related data monitoring tool.
Since the information visualized in the web browser relies heavily on the content of the data source, it is necessary to enrich the data source so that the building and energy-related visualization can reach its potential to deliver better and more valuable information as a climate-neutral awareness-raising tool.

Figure 2 .
Figure 2.An illustration of a 2D visualization.Base Map c OpenStreetMap contributors.

Figure 4 .
Figure 4. Overview of the 4-storey test building.Each floor is a single 3D model which can be managed separately.(Bottom-Top) Test building ground floor; first floor, second floor; third floor.

Figure 5 .
Figure 5. Sensors' spatial attribute visualization on the ground floor (top) and second floor (bottom) of the test building in 2D (left) and 3D (right) platforms.Each circle on the map, or each sphere in the 3D model, represents a sensor's location.Base Map c OpenStreetMap contributors.

Figure 7 .
Figure 7. Web interface and data download procedure in the 3D platform.1) Selecting a sensor to download can be done by clicking the sensor.2) A list of selected sensors.3) A button to show sensor data overview before downloading the data.The data overview is the same as the one in the 2D platform.4) Each floor of the building, including the sensors within, can be shown or hidden independently.Base Map c OpenStreetMap contributors.