A 3D CAMPUS APPLICATION BASED ON CITY MODELS AND WEBGL

: In parallel with the technological developments, the conventional ways of mapping and the presentation of the geospatial data have changed significantly. 3D city models including the digital terrain models (DTMs) have become important for many application fields, such as simulation and visualization tasks for navigation, urban planning, environmental monitoring, disaster management, etc. Although currently most 3D city models are employed for visualization purposes, their application areas are increasing continuously. The presentation of these models on the web is also becoming more common than before while overcoming the performance issues with newer data types and functionalities. The biggest advantage of using web browsers is that they can be accessed everywhere without any additional software requirements. Therefore, the tools for web-based implementations of virtual globes, which allow users to navigate their data in 3D, have been available with greater numbers of functionality they offer. Online virtual web globes provide a good base for the 3D Geographical Information System (GIS) applications as well. 3D city models have also become virtual environments where different spatial queries and analysis can be performed. As a part of a 3D WebGIS, a city model enriched with semantic information provides a virtual platform for decision makers and allows realistic simulations for planning. The main aims of this study are to develop a prototype of a 3D GIS environment for Hacettepe University Beytepe campus, including 3D building geometries enriched with semantic information and a high resolution DTM; and to design a web interface using an open source virtual globe.


INTRODUCTION
Geographical Information Systems (GIS) are inevitable platforms for the efficient management of cities, and modelling and visualization in 3D have become a crucial component of GIS (Buyukdemircioglu et al., 2018).The use of 3D GIS has been limited to urban planning and visualization via city models (Zhang et al., 2004;Zlatanova et al., 2002) until recently, but new developments in computer technologies have expanded its limits.Several studies have investigated and integrated 3D components in their GIS, in terms of spatial, semantics and analysis (Magarotto et al., 2014;Jihui et al., 2016;Wang et al., 2015;Huang et al., 2016;Scianna, 2013;Landeschi et al., 2016;Hu et al., 2015;Li et al., 2015).Wate et al. (2013) have emphasized the importance of true 3D GIS functionality such as efficient querying 3D geo-objects, 3D analyses (3D overlay, 3D buffering, 3D shortest route), 3D inter-visibility in their study.
With the recent technological developments in computer graphics and web, visualizing geospatial data on web browsers, also on virtual globes has become more common.The main advantage of using web browsers for GIS, thus WebGIS, is that they can be accessed everywhere and do not require specific geospatial software knowledge.Another reason for their success is mainly due to their support for different types of geospatial data types such as high-resolution images, terrains and 3D objects (Zhu et al., 2018).3D Terrain visualization and topography plays an important part in 3D city models and many application areas (Doneus, 2013).Without a high-resolution terrain underlying the model, the data would be incomplete and lead to misleading results.If the digital terrain model or the city model are not coherent with each other or accurate, this may lead to visual deformations.
The aim of this study is to develop a prototype for a 3D WebGIS environment for Beytepe Campus of Hacettepe University, Ankara.Being a large state university, Hacettepe has four settlements in total, which are spread at different locations in Ankara.All these settlements need to be connected and planned together.This study provides a preliminary model for Beytepe only, which may encompass the other three in the future.Almost fifty thousand people spend the day in Beytepe campus, while approximately eight thousands of them live permanently.The campus area is approximately six square kilometres.A general overview of the campus is provided in Figure 1.The campus area has a relatively rough topography, and covered with pine forests, roads, buildings and a small natural lake.
Managing the campus facilities is already a difficult task, since different stakeholders (e.g.students, faculty, administrative staff, visitors, etc.) have different needs.Among all, transportation planning is a major issue, due to the peak commuting hours in the morning and evening, and also because the transportation services are operated by three different providers (i.e.Ankara greater municipality, private shuttles for students and for employees).On top of these, the number of cars entering the campus are in the order of thousands which bring more complexity in terms of traffic planning and parking.On the other hand, the planning of spaces, such as lecture halls, offices, meeting and conference rooms, eating facilities, etc., cleaning services, maintenance, logistics, etc. should be carried out on daily basis and optimally.
There are some previous work done for modelling 3D campus environments.Singh et al. (2014) has generated an image based virtual 3D campus using ESRI CityEngine.Hering et al. (2012) developed a real-time browser-rendered 3D campus information system based on WebGL.Kahraman et al. (2011) also developed a web-based 3D campus information system using CAD (Computer Aided Design) data.Al-Rawabdeh et al. (2014) has built a GIS application for improving data management and to develop methods using 3D spatial analysis for specific applications at the Al al-Bayt University Campus.All these work have been done by mostly using commercial software for generating / publishing models or using manually extracted 3D geometries or texturing done by operators.Questions on the capabilities of web interfaces, performance and queries are also open in these studies.This paper describes the processing steps and issues while producing a 3D City models of the campus using the images acquired from a large-format digital aerial camera and discusses the possibilities and the state of the art in visualization of the campus data using two different open source virtual globes.The use of Cesium (2018), based on Javascript and WebGL and also Potree (2018) JavaScript library have been presented here.The visualization formats and methods applied during the implementation have been presented and their advantages disadvantages have been analysed.Possibilities of 3D queries and styling options that can be performed on the developed WebGIS interface have been discussed as well.

STUDY AREA AND DATASET
The study are covers Hacettepe University Beytepe campus.Three aerial stereo photographs have been acquired in 2015 using the Ultracam-X camera produced by Vexcel Imaging (2018) on an airplane.The stereo images have a ground resolution of 30 cm and the respective interior and exterior orientation parameters have also been provided by General Directorate of Mapping.The images and the orientation parameters have been used for generating dense point cloud (Figure 2) in Agisoft Photoscan software (2018).The point cloud has been converted to a grid Digital Surface Model (DSM).A grid DTM has also been generated by filtering the DSM (Figure 3) and converted into grid form (stored as raster) as well.A total of 106 building footprints have been manually generated from the stereo images (Figure 4).In addition, an orthoimage mosaic of the area has also been produced.In this study, the DTM is used for generating the 3D building geometries (in level of detail -LOD1) together with the DSM and the building footprints; and also to make sure that buildings are located and clamped exactly on the terrain, not under or above of it while visualising.

3D CAMPUS MODEL IMPLEMENTATION
FME Workbench from Safe Software (2018) has been used for format and geometry conversions as well as attribution of the model.The building footprints have been extruded to produce 3D models using the height information and converted into Cesium 3D Tiles format.The height information has been obtained from the difference of the minimum and maximum elevation values of the grid DSM and the DTM.The lowest pixel value of the DTM represents the ground while the highest value of the DSM represents the top of the roof.Since there is no exact definition for the roof height of the LoD1 in CityGML schema, the highest elevation value inside the footprint is considered as the roof height.Although this approach has led to some misleading results, such as trees hanging over the roof can be considered as a roof point, such errors have been left in the model for the time being.As the last step, the building footprints have been extruded using the computed elevations of the buildings.The extruded LoD1 buildings can be seen in Figure 5.

CesiumJS
Cesium virtual globe, which is an open-source for visualizing geospatial data, has been employed used for visualization of the 3D campus model.It supports terrain visualization, different imagery layers and 3D georeferenced geometries with textures using WebGL technology.WebGL supports visualizing 3D objects on web browsers running on any operating system without the requirement for additional plug-ins or extensions.Generated buildings are converted into CityGML, and then the 3D Tiles format using FME software and visualized along with the terrain model and clamped to the terrain.3D Tiles format is capable of visualizing large volumes of semantic 3D geometries with high performance on Cesium.3D tiles also support storing predefined attributes of each individual building, which can later be used for 3D queries and styling on customized web interface.Buildings styled according to their distances to the Geomatics Engineering Department building can be seen in Figure 6.

Potree
Potree ( 2018) is a free open-source WebGL based point cloud renderer for large point clouds.It is capable of streaming and rendering dense point clouds in web browser without the need to load the whole data at once and any plugin requirements.Using hierarchical structure that stores subsamples of the original dataset at different resolutions increasing performance and reducing the load on the computer hardware.Potree also supports point picking and doing measurements on dense point cloud data at any zoom level.Agisoft Photoscan, which is used for DSM and orthoimage generation, can export dense point cloud in Potree format directly (Figure 7).The exported data is ready to be visualized on web.Visualisation of the campus model using Potree with measurement functionality is depicted in Figure 8.

Comparison and Discussion
Two Javascript libraries, Cesium and Potree, based on WebGL has been used in this study for the visualisation of the campus 3D data and their geometric and semantic attributes.From the experiences, it can be said that both libraries have different advantages and disadvantages, such as availability of 3D queries, styling options, measurement functionalities, integration of other data sources and map services, and visualisation of different data types and geometries etc.
The most significant features of Potree are; -Pros: higher performance for point cloud (also textured) and mesh model visualisation; availability of measurement tools; some styling options; -Cons: No semantics can be integrated.Does not allow visualisation of other datasets as layers, such as web map services.
On the other hand, pros and cons of Cesium can be listed as following; -Pros: flexibility to show city models at different levels of details (i.e.LOD0-LOD4); visualisation; some styling options; model attributes can be integrated and queried; layer configurations (on/off) and web map service integration.
-Cons: Availability of measurement tools is less; slower visualisation of dense point clouds; the number of points should be decreased or the DSMs/DTMs should be tiled for visualisation in some cases.

CONCLUSIONS AND FUTURE WORK
A 3D model of the Hacettepe University, Beytepe Campus have been generated and visualized in this study, for the purpose creating a prototype 3D GIS environment.LoD1 models of the campus buildings have been generated using DSM and DTM along with a few basic geometric and semantic attributes of the buildings.Also, a high-resolution terrain model is visualized together with the campus model.Cesium and Potree JavaScript libraries have been used for interface development and analysed for their suitability as open source tools to cover the requirements of a WebGIS.Although they show different characteristics especially in performance, styling and querying options; Cesium has been favourable for the purposes of a 3D GIS, since it provides support for different data types (LODs, point clouds, textured mesh model, terrain, web map services) and also semantic information, which can be stored statically in 3D tiles format or dynamically in a database management system.On the other hand, dense point clouds and textured mesh models can be presented using Potree with much higher performance.
The future work of this study include; -Design and development of a comprehensive GIS environment for the use of different stakeholders as well as decision makers; -Implementation of new 3D queries and styling methods on the web interface; -Generation of higher level models (LOD4) and integrate with Building Information Model (BIM) based on the availability of the data; -Development of a database update scheme for the proposed GIS, also with the help of volunteer geographical information (VGI) and citizen science (CitSci) approaches; -Investigate the possibilities of storing the generated models directly in a geodatabase and perform geometric updates also in the database (currently, after every update on the model, the whole area must be produced again and visualized accordingly); -Integration of other object types, such as roads, trees, etc., with their geometries and semantics in the model.

Figure 2 .
Figure 2. Overview of the generated DSM

Figure 5 .
Figure 5. Overview of the generated LoD1 campus model.

Figure 6 .
Figure 6.Buildings colored by distance to a landmark (Geomatics Engineering Department building depicted with green) on Cesium.

Figure 7 .
Figure 7. Visualisation of dense point cloud on Potree web interface.

Figure 8 .
Figure 8.Using area measuring tool on Potree web interface.