Integration of CityGML and Air Quality Spatio-Temporal Data Series via OGC SOS Wanji Zhu Sven Wursthorn Karlsruhe Institute of Technology European Institute for Karlsruhe Institute of Technology Energy Research Email: Sven.Wursthorn@kit.edu Email: Wanji.Zhu@eifer.uni-karlsruhe.de Alexandru Nichersu Alexander Simons European Institute for Energy European Institute for Energy Research Email: Alexandru.Nichersu@eifer.org Research Email: Alexander.Simons@eifer.org Abstract—Cities have always been considered a horsepower of These are often associated to the notion of common wealth. industrial growth over centuries. However, urbanization often has The environmental effects are often associated with environmental effects. In this paper we will focus on one of them, urbanization and affect the quality of life. Air pollution is one namely air pollution, and how we can integrate 3D city models and of the most important side effects of urbanization. In Europe, air quality sensor data. In most cases, air quality data is acquired 3D city models have become readily available and it is only from static sensor systems like weather stations, which lack the coverage required for urban simulation. Applying mobile data for the next logical step to link them to air quality sensor data. air quality models is more reasonable due to the spatial coverage of the urban model. Yet academic research has been scarce on the A. Serving CityGML via WFS integration of city models and spatio-temporal varying sensor data. To close the gap, this paper proposes a novel approach to integrate 1) Concept of CityGML: The City Geography Markup city model data and spatio-temporal data in an interoperable and Language (CityGML) is a comprehensive concept for the standardized way. The geometry aspects of a city are described by modeling and exchange of 3D city and landscape models. As those defined in CityGML and the air spatio-temporal varying data an open data model, CityGML defines full-blown classes and is retrieved by OGC Sensor Observation Service. The approach relations describing 3D objects regarding their geometry, uses Cesium JS, a JavaScript library for visualizing the semantical city model stored in CityGML and the OGC SOS observation topology, semantics and appearance properties. This allows the service from 52°North for the air quality data transmission. employment of virtual 3D city models for complicated analytical tasks in different domains such as simulations, urban Keywords—CityGML; SOS; Spatio-Temporal; Varying Data; data mining and facility management [1]. Air Quality CityGML defines five consecutive Levels of Detail (LOD), from terrain alone to architectural models (outside and inte- I. INTRODUCTION rior). With increasing LOD, objects become more detailed both at the geometric and thematic level [2]. In addition to Cities have to navigate around different concepts for urban their attributes, objects in CityGML can have external planning to solve problems they are facing today and tomorrow. references to corresponding objects in other databases or data The smart city vision involves the integration of solutions for sets. CityGML also provides an extension mechanism with the information and communication technologies to help in Application Domain Extension (ADE) in order to enrich data providing municipal services, such as. sanitation, water supply, for specific domain areas. That is where different kinds of street network, public libraries, schools, food inspection, fire models, such as environmental noise models, energy models department, police, ambulance, other health department issues and air quality models, can come into play. The most and transportation. The integration of classical municipal ser- important development for using CityGML and energy related vices and Web services is a big challenge for many players data together has been built through the ADE mechanism and worldwide, e.g. IT services providers, urban systems operators, is called the EnergyADE [3]. energy providers. Open interoperable standards and the use of geo-spatial information provides an environment filled with The objective of the EnergyADE is the storing and opportunities for cities as they empower them to use their managing of data needed for simulating complex urban energy socioeconomical data for different applications in the domains of models, which consider existing international building and analysis and modeling, visualization, semantics and metadata. energy data specifications (INSPIRE, BEDES). An important An important component of a city’s success is the perceived feature of this ADE is the possibility to handle different data quality of life. Citizens and companies expect to have better qualities regarding level of details and complexity of energy access to services, health facilities and consumption goods. models (E.g. monthly energy balance of ISO 13790, sub-hourly dynamic simulation of software such as CitySim or advanced version including more WFS operations is com- EnergyPlus) [4]. mercially available from the company virtualcity SYSTEMS GmbH Berlin [8]. Another example is the WFS integrated with CityGML is released and implemented as a GML application CityGML offered by Snowflake. It supports both the OGC schema for the Geography Markup Language version 3.1.1, WFS 1.0 and 1.1 specifications [1]. These products satisfied issued by the Open Geospatial Consortium (OGC) and the ISO the need of the market to some extent, but open source projects TC211 [5]. This allows CityGML to be used with the whole and free products with full functionality for users in research family of GML compatible OGC Web Services for data and development are currently limited. accessing, processing and cataloging like Web Feature Service (WFS), Web Processing Service (WPS) and the Catalog Service One of the goals of this paper is to search for an open [6]. source solution to serve CityGML via a WFS with advanced functionality. Thus, to achieve this objective, all software used 2) Advantages of a WFS: Since CityGML is quickly being should be open source, and, as such, an open mechanism to adopted on an international level, serving and retrieving provide CityGML data is needed. One of those solutions tested CityGML data over the web becomes more appealing than any for this paper was GeoServer in combination with its time before. This is also a focus of this paper. Using traditional “Application Schema” extension. The main reason for communication techniques, such as File Transfer Protocol (FTP), choosing GeoServer to serve CityGML is that it has to share CityGML data led to some underlying problems. The implemented the OGC WFS standard. This is considered a major one is that CityGML data size can become rather large reference implementation of the WFS and provides even for a small geographical region, when the CityGML model full-fledged WFS functionality including discovery, query, is at a high level of detail. This causes issues for users or clients locking, transaction and stored query operations [10]. In uploading and downloading data. To solve this problem, the Web addition, its “Application Schema” extension allows users to Feature Service (WFS) Standard, first published with version define complex feature types by “Feature Chaining” [11], in 1.0.0 in 2002, comes into play. The key characteristic of the which feature types are configured independently, with WFS is to allow users to share geographic information at relationships specified in the mapping file [12]. This implies fine-grained feature and feature property level rather than at the that using GeoServer with the Application Schema satisfies not file level. That completely changes the way in which geographic only the complexity of feature types defined in the CityGML information is created, modified and exchanged via the Internet model, but also provides WFS operations, as well as various [7]. There are multiple advantages to serving CityGML via a query filters. WFS. One of the most important advantages is that the WFS is a standardized interface. Rather than sharing the whole dataset of The GeoServer Application Schema is made up of two CityGML data, which is stored on a relational geodatabase using concepts called “Feature Mapping” and “Feature Chaining”. the 3DCityDb structure [8], data can be exchanged based on “Feature Mapping” defines the relationships between a source specific feature types, such as buildings, transportation or others feature type (in most cases tables in a relational database) and defined by the CityGML public schema. This allows CityGML a target feature type, which is declared in a public GML data to be queried by using various filters depending on application schema. “Feature Chaining” helps to construct a implementation of conformance of the WFS. For example, a user complex feature type, in which simple features can be could request all buildings based on a given Bounding Box by structured in a hierarchical way. These two concepts allow the using a WFS instance, which supports the spatial filter query. Application Schema to map complex feature types defined in CityGML. However, there are some restrictions to how this 3) Obstacles of Implementation: As depicted above, serving works. The most important one is that all public GML CityGML via a WFS improves the performance of exchanging application schemas used for mapping with the GeoServer data. However, a number of technical challenges arise from the Application Schema must satisfy the GML encoding rule, characteristics of the CityGML model. In the first place, the known as the “Striping” rule. The “Striping” rule requires that CityGML model makes extensive use of complex data types for a complex type is never the direct property of another complex properties and nesting of features within feature collections. type. The complex types are always contained in a property This, in consequence, causes CityGML to have a deep nested type to ensure that their specific type is encoded in a data structure. In addition, the geometry types supported in surrounding element or container element. In other words, the relational databases are often more limited than those used in GeoServer Application Schema supports those schemas, which CityGML, which could be a restriction for those WFS enforce all the GML encoding rules. In terms of CityGML, a implemented on top of a relational database [9]. couple of schemas are involved to describe feature types of city objects. However, not all schemas obey the GML Despite the technical challenge mentioned before, at least two encoding rules. One of them is the generic.xsd, which defines commercial solutions have appeared to cover the existing market the generic attributes of city objects. It is pivotal to storing demand. The Project 3D City DB, which provides a 3D additional information about all kinds of models, such as geodatabase based on CityGML, released an implementation for energy models and heat models. This is the main reason why the 2.0 version of the OGC Web Feature Service. However, this GeoServer with Application Schema can’t completely satisfy satisfies only the simple WFS conformance class and the the need. B. Serving Spatio-Temporal Air Quality Data via SOS data should be considered as time series sampling. The part of encoding sensor metadata according to the SensorML 2.0 1) Concept of SOS: The Sensor Observation Service (SOS) includes the description of our physical sensor systems. The standard provides a standardized interface for managing and following information has to be defined: sensor identifier, retrieving metadata and observations from heterogeneous sensor definition of sensor input and output, sensors’ constraints and systems, which include a variety of sensor types, such as in-situ their connections within the sensor system . On the other hand, and remote sensors, mobile sensor platforms or networks of the part of encoding sensor data is to actually convert the static sensors. In particular, this standard specifies how the sensor measurements into the concept “Observation”. To observation, sensor description, as well as computational define an observation, six elements should be involved representation of observed features are accessed in an according to the O&M Model. These are: “procedure”, interoperable way. It further defines means to register new “phenomenon time”, “result time”, “observed property”, sensors and delete old ones. This standard also provides a “feature of interest” and “result”. Listing 1 demonstrates how mechanism to insert new observations and remove existing ones these six elements of one single observation are defined in our case. The “procedure” should be linked to a specific sensor [13]. SOS 2.0 relies on the Sensor Model Language (SensorML) identifier defined in the sensor metadata part and the standard to encode meta description of sensor and the “phenomenon time” is considered to be equal to “result time”. Observation and Measurement standard (O&M Model) to encode This is represented by the sampling timestamps, with a data gathered by sensors. The SOS is an OGC standard and temporal resolution of recording varying every second. The ultimately only defines a service interface but not an measurement of each timestamp is represented by a centered implementation. There are currently several Open Source one-minute mean over a window of 60 data points. “Feature of implementations of this service, such as 52°North SOS, deegree interest” represents the geometric information of the SOS and istSOS. To achieve the goal of air quality data observation, which for a static sensor system like weather integration with CityGML, 52°North SOS was chosen for our stations can be depicted by the location of the relevant sensor. SOS deployment. 52°North SOS is standardized, interoperable In this case, the “feature of interest” is considered a sampling and has a consistent implementation [14]. feature, analyzing the “bubble of air”. As for a mobile sensor platform, the geolocation of each observation varies all the 2) Description of Air Quality Data: The air quality data used time during the movement of the sensors. Thus, “feature of in this paper is supplied by the “AERO-TRAM” project, interest” in this case should be used as a domain feature sponsored by environmental ministry of Baden-Württemberg and (known as sampled feature). The street on which our tram realized by the Karlsruhe Institute of Technology. The latter’s passed along and the geometry point of each observation is aim is an extensively automated, long-term study of described as a sampling feature. The second process is the concentration, spatial distribution of parameters such as O3, NO, import of the encoded data into the database. To that end a data NOx, CO, CO2, H2O(g), particle size distribution and total feeder is needed. The SOS instance used in this paper, the particle count in the area of Karlsruhe. In this project, the spatial 52°North SOS, has released a tool called “SOS Importer”, distribution of air particles was continuously measured by an which supports the import of data into the database suitable inlet sensor system, which is carried by the S-Bahn’s (the local both for mobile and static sensor platforms. train system) two trams, the S1 and S2 in Karlsruhe. The selection of the actual running line depends on the internal scheduling procedure of the municipal transport service. Line S1 1 characterizes a specific height profile and Line S2 has a complete 2 NO flat profile [15]. Each observation of air quality took place in a 3 s1-no1-observation short time interval when the trams moved along their paths. In -0 other words, the air quality sensor data varied both in spatial and 4 5 3) Encoding mobile Sensor Data: In order to provide the air 6 quality data via SOS, two key processes should be undertaken, 7 2015-12-13T05:59:40 populating an O&M database with data behind the SOS instance. 8 9 Encoding data in a standard format is, more specifically, the 10 encoding of the description of sensors and the sensor 11 measurements based on the SensorML Model and O&M Model 12 specifications respectively. The encoded file format should be 13 compliant to the binding mechanisms supported by the SOS 14 measured during its movement, our sensor system falls into the 15 16 17 49.052822 8.388629 18 19 20 21 22 23 24 3.08 25 Listing 1. Sample XML excerpt of a single observation 4) Serving Mobile Sensor Data with the 52°North SOS’s Fig. 1. Workflow of Integration between CityGML and Air Quality Data Sensor Web RESTful API 2.0: The Representational State request of CityGML to the “feature of interest” of Transfer (RESTful) Web services are considered much more observations. This approach works because the 52°North SOS lightweight and often better integrated with HTTP than can handle the features both in an internal and external way. SOAP-based Web services, because RESTful Web services do The third approach is the use of Dynamizers [18]. Dynamizers not require XML messages or WSDL service descriptions [16]. are a mechanism that allows the storing of dynamic values Thus, all the data used for this paper are designed to be accessed separately from the original attributes in CityGML. This by RESTful services and then are used on the client side. The approach is contrary to the second one. The new CityGML 52°North SOS supports the RESTful API, whose current stable data type “SensorConnection” defined in Dynamizers can be version is 1.0 and it supports HTTP GET as well as POST linked by various SOS requests for sensor metadata and the methods. This RESTful API provides easy access to time series observations. For our work we used the first approach. Figure information from the SOS instances. However, there are 2 and Figure 3 illustrate a Web demo based on the current limitations to serving air quality data via this API. It currently infrastructure. As Figure 2 depicts, tram vehicle S1’s only supports time series data from static sensors and not yet observations, whose observed property is NO, are visualized as from mobile sensor platforms. One of the core query parameters a track of color-coded dots (see legend in the second floating named “station” is designed for orientation of resources and only window on the right of Figure 2). The observations are considers the “feature of interest” of observation as a sampling previously classified into different groups based on their feature. This means the stations can only represent the location of values. A semantic 3D model of north-west Karlsruhe is also a static sensor. In our case, the “feature of interest” is designed as loaded to the platform. The track information, such as its a domain feature, which is not a simple geometry point. The platform, procedure and observed property etc. is displayed on geometry information of each observation, which is encoded as a the info box of the Web demo. Figure 3 shows a time slot sampling feature, will not be accessible using the current API. In interface, which allows the user to observe how the results of order to supply sensor data from heterogeneous sensor systems, the track varies in a specific interval. the 52°North SOS has released a new beta version of the Sensor Web REST API 2.0, which aims to support mobile sensor systems. With the extension of this API, the mobile air quality II. CONCLUSION data can be accessed and later integrated with CityGML data on the client side. The workflow of this paper can be summarized into two stages, namely data acquisition and data fusion. In terms of C. Integration of CityGML and Air Quality Data data acquisition, the OGC WFS and SOS standards are applied In this paper, the JavaScript library “Cesium” was chosen for to retrieve CityGML and spatio-temporal varying air quality visualization on the client side. Cesium is a WebGL virtual globe data respectively. It has been proved that GeoServer and its ex- and map engine, which is capable of displaying KML and tension Application Schema is not a complete solution to serve COLLADA/gITF files built on CityGML data [17]. There are CityGML via WFS, due to the issues with CityGML and the several approaches considered for the integration of CityGML encoding rules of GML. A solution would be a more advanced and air quality data via SOS. The first one is to display the urban CityGML WFS with RESTful API. As for the air quality data, model described by CityGML on Cesium and visualize the the 52°North SOS SNAPSHOT 4.4.0 release modified the observation data as sampling points overlaying the city objects. database schema to support mobile sensor platforms and The workflow of this approach is depicted by Figure 1. The provides a beta 2.0 RESTful API to extend query for ”tracks”. second approach is to couple SOS by referencingthe WFS This has proven to be suitable to store observations whose ACKNOWLEDGEMENT The authors of this study would like to thank the researchers and colleagues of the “AERO-TRAM” project for the data provision, their colleagues at EIFER -European Institute For Energy Research- as well as KIT-IPF Karlsruhe Institute of Technology Institute of Photogrammetry and Remote Sensing for their continued support and assistance. A special thanks goes to Christian Malewski for advice on setting up the project. The methodological basis presented here was developed in the context of a research and development project called the EDF City Simulation Platform Project. It has been running from 2012 to 2016 in EIFER and other institutes of EDF (Electricite de France). REFERENCES Fig. 2. Web Demo of Integration between CityGML and Air Quality Data on Cesium. The dotted line shows color coded NO values along the tram line. [1] K.-H. Häfele, “Citygml wiki.” [Online]. Available: http://www. citygmlwiki.org/index.php?title=Citygml Wiki (visited on 13/05/2016). [2] C. Mtral, G. Falquet, and K. Karatzas, “Ontologies for the integration of air quality models and 3d city models,” In Conceptual Models for Practitioners, Jan 2012. [3] “Citygml energy ade.” [Online]. Available: http://www.citygmlwiki.org/ index.php?title=CityGML Energy ADE (visited on 30/06/2016). [4] R. Nouvel, R. Kaden, J.-M. Bahu, J. Kaempf, P. Cipriano, M. Lauster, J. Benner, E. Munoz, O. Tournaire, and E. Casper, “Genesis of the citygml energyade,” in Proceedings of International Conference CISBAT 2015 Future Buildings and Districts Sustainability from Nano to Urban Scale, Scartezzini and Jean-Louis, Eds., sep 2015. [Online]. Available: https://infoscience.epfl.ch/record/213436 [5] G. Gröger, T. H.Kolbe, C. Nagel, and K.-H. Häfele, “OGC City Geography Markup Language (CityGML) Encoding Standard,” OGC 12-019, Version 2.0.0, apr 2012. [Online]. Available: http:// www.opengis.net/spec/citygml/2.0 (visited on 15/06/2016). [6] “Citygml homepage.” [Online]. Available: http:/ /www.citygml.org (visited on 13/05/2016). [7] P. P. A. Vretanos, “OGC Web Feature Service 2.0 Interface Standard With Corrigendum,” OGC 09-025r1 and ISO/DIS 19142, Version 2.0.0, nov 2010. [Online]. Available: http://www.opengeospatial.org/ Fig. 3. Web Demo of Integration between CityGML and Air Quality Data on standards/wfs (visited on 13/06/2016). Cesium. The graph shows the variation of NO values within a specific interval. [8] “3dcitydb documentation v3,” pp. 217–218, 2015. [Online]. Available: http://www.3dcitydb.org/3dcitydb/documentation/ (visited on “feature of interest” is a domain feature. This can satisfy the 18/06/2016). demand of mobile sensor data provision. The second stage, data [9] E. Curtis, Advances in 3D Geoinformation Systems. Springer Berlin fusion or data integration, is achieved by accessing Heidelberg, dec 2008, ch. Serving CityGML via Web Feature Services heterogeneous data with the RESTful API. The approach used in in the OGC Web Services -Phase 4 Testbed, pp. 331–340. this paper is appropriate when only visualization is needed. The [10] “Wfs basics.” [Online]. Available: http://docs.geoserver.org/2.2.1/user/ downside of this approach is the lack of relationships between services/wfs/basics.html (visited on 12/05/2016). city objects in the model and observation data. [11] “Feature chaining.” [Online]. Available: http://docs.geoserver.org/stable/ en/user/data/app-schema/feature-chaining.html (visited on 14/05/2016). [12] B. Caradoc-Davies and R. Angreani, “Geoserver application schema support: Complex web feature service for geoscience interoperability,” Manuscript -CSIRO Research Publications Repository, nov 2010. [13] A. Bröring, C. Stasch, and J. Echterhoff, “OGC Sensor Observation Service Interface Standard,” OGC 12-006, Version 2.0.0, apr 2012. [Online]. Available: http://www.opengis.net/doc/IS/SOS/2.0 [14] “Sensor web community.” [Online]. Available: http://52north.org/ communities/sensorweb/ (visited on 30/06/2016). [15] R. Hagemann, U. Corsmeier, C. Kottmeier, R. Rinke, A. Wieser, and B. Vogel, “Spatial variability of particle number concentrations and {NOx} in the karlsruhe (germany) area obtained with the mobile laboratory aero-tram,” Atmospheric Environment, vol. 94, pp. 341 – 352, 2014. [Online]. Available: http://www.sciencedirect.com/science/ article/pii/S1352231014003987 [16] E. Jendrock, R. C.-N. I. Evans, D. G. K. Haase, and W. M. C. Srivathsa, “Introduction to web services.” [Online]. Available: http:// docs.oracle.com/javaee/6/tutorial/doc/gijti.html (visited on 28/06/2016). [17] “Demos 3dcitydb.” [Online]. Available: http://cesiumjs.org/demos/ 3dcitydb.html (visited on 28/06/2016). [18] K. Chaturvedi and T. H. Kolbe, “Dynamizers -Modeling and Implementing Dynamic Properties for Semantic 3D City Models,” in Eurographics Workshop on Urban Data Modelling and Visualisation, F. Biljecki and V. Tourre, Eds. The Eurographics Association, 2015. ..................................................................................................................