Publication Date: 2020-07-29

Approval Date: 2020-03-10

Submission Date: 2020-03-02

Reference number of this document: OGC 19-073r1

Reference URL for this document: http://www.opengis.net/doc/PER/3D-IoT-Platform

Category: OGC Public Engineering Report

Editor: Volker Coors

Title: OGC 3D-IoT Platform for Smart Cities Engineering Report


OGC Public Engineering Report

COPYRIGHT

Copyright © 2020 Open Geospatial Consortium. To obtain additional rights of use, visit http://www.opengeospatial.org/

WARNING

This document is not an OGC Standard. This document is an OGC Public Engineering Report created as a deliverable in an OGC Interoperability Initiative and is not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, any OGC Public Engineering Report should not be referenced as required or mandatory technology in procurements. However, the discussions in this document could very well lead to the definition of an OGC Standard.

LICENSE AGREEMENT

Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.

If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.

THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD. THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.

This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.

Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications.

This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.

None of the Intellectual Property or underlying information or technology may be downloaded or otherwise exported or reexported in violation of U.S. export laws and regulations. In addition, you are responsible for complying with any local laws in your jurisdiction which may impact your right to import, export or use the Intellectual Property, and you represent that you have complied with any regulations or registration procedures required by applicable law to make this license enforceable.

Table of Contents

1. Subject

Recent years have seen a significant increase in the use of three-dimensional (3D) data in the Internet of Things (IoT). The goal of the 3D IoT Platform for Smart Cities Pilot was to advance the use of open standards for integrating environmental, building, and IoT data in Smart Cities. Under this initiative a proof of concept (PoC) has been conducted to better understand the capabilities to be supported by a 3D IoT Smart City Platform under the following standards: CityGML, IndoorGML, SensorThings API, 3D Portrayal Service, and 3D Tiles.

1.1. Executive Summary

An OGC Pilot was carried out to bring together city models (indoor or outdoor) and sensor observations so that observable properties could be defined and visualized for both individual and aggregate components of buildings and larger city units. Dynamic sensor observations were provided for measuring Particulate Matter (PM) - the mixture of solid particles and liquid droplets in the air. The observations measured both PM2.5 air quality (fine particulate matter of a mass per cubic meter of air of particles with a size generally less than 2.5 micrometres) and building room occupancy. The PM2.5 air quality was measured and synthesized for outdoor point locations and building room occupancy was synthesized for single room locations. Observations were made available through services that implemented the OGC SensorThings API standard. Features represented using the OGC IndoorGML building model and 3D-Tiles / glTF city model features were provisioned through implementations of the OGC API – Features – Part 1:Core standard. IndoorGML is a profile of the OGC Geography Markup Language (GML) standard. Various clients deployed in the pilot fetched both features and observations keyed to them by a GML identifier (GML ID), written as ‘gmlid’ in markup, so as to allow users to interact with city feature rendered according to their dynamically observed properties. Clients included stand-alone dashboard applications, applications based on 3DPS (3D Portrayal Service), and AR (Augmented Reality) visualization tools.

Web Processing Service (WPS) and OGC API - Processes implementations were deployed to aggregate and/or interpolate observations from multiple locations in order to estimate the observable properties of larger city features such as building floor interiors and the air masses above city streets or blocks. These derived observations could either be visualized directly in client applications or posted to implementations of the SensorThings API as new data.

The pilot demonstrated a viable standards-based distributed architecture for connecting dynamic sensor observations with modeled city features. It also demonstrated the importance of aligning feature / sensor identifiers and other infrastructure data in order to sustain robust Smart City 3D-IoT capabilities.

Smart cities are communities where information technology and data are used to address social, economic, and environmental challenges. Smart Cities solutions are both popular for improving city livability, and necessary for responding to trends such as climate change and increasing urbanization.

The pilot recommends the following future work:

  • There is a need to look into optimization of real-time access to geospatial data for indoor maps and navigation. Development of an indoor viewer plugin that can stream data from a server.

  • Vuforia SDK is only specific to Microsoft Windows and Apple MacOS. Exploring ARCore and ARkit to handle markerless Augmented Reality (similar to the Pokemon Go game) would be worth investigating as they run on Linux.

  • Future development should include a mobile application that retrieves IndoorGML from an OGC API - Features server to display indoor maps in Augmented Reality.

  • There is a need to consider improvements for serving representations of buildings, based on zoom level, via an implementation of the draft OGC API – Tiles specification.

1.2. Document contributor contact points

All questions regarding this document should be directed to the editor or the contributors:

Contacts

Name Organization Role

Charles Chen

Skymantics

Contributor

ChenYu Hao

GISFCU

Contributor

Hyemi Jeong

Gaia3D

Contributor

Josh Lieberman

OGC

Contributor

Ki-Joune Li

Pusan National University

Contributor

Logan Stark

Skymantics

Contributor

Ravi Nishesh

Cyient

Contributor

Steve Liang

SensorUp

Contributor

Theo Braun

Helyx

Contributor

Thunyathep Santhanavanich

HFT Stuttgart, Steinbeis

Contributor

Volker Coors

HFT Stuttgart, Steinbeis

Editor

1.3. Foreword

Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.

Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.

2. References

3. Terms and definitions

For the purposes of this report, the definitions specified in Clause 4 of the OWS Common Implementation Standard OGC 06-121r9 shall apply. In addition, the following terms and definitions apply.

● feature

A feature is an abstraction of real world phenomena (source: OGC 08-126)

● WFS model server

A server component that delivers a representation of a feature such as a building. The interface of the model server is OGC API - Features in this Pilot.

● particulate matter

The mixture of solid particles and liquid droplets in the air (source: UK DEFRA)

● Sensor

An entity capable of observing a phenomenon and returning an observed value. Type of observation procedure that provides the estimated value of an observed property at its output. [OGC 12-000]

Further terms and definitions used in the Pilot are specified in detail the Conceptual Model in section 5 .

3.1. Abbreviated terms

  • FoI Feature of Interest

  • GL Graphics Library

  • glTF GL Transmission Format

  • GML Geography Markup Language

  • I3S Indexed 3D scenes

  • IDW Inverse distance weighting

  • IoT Internet of Things

  • JSON JavaScript Object Notation

  • LOD Level of Detail

  • STAPI SensorThings API

  • UML Unified Modeling Language

  • WFS Web Feature Service

  • WPS Web Processing Service

4. Overview

4.1. Background

Smart cities are communities where information technology and data are used to address social, economic, and environmental challenges. Smart City solutions are both popular for improving city livability, and necessary for responding to trends such as climate change and increasing urbanization.

Sejong City, founded in 2007, is the new administrative city of South Korea. The Sejong 5-1 District is the site of a wide-ranging Smart City Initiative, led by the Korea Land and Housing (LH) Corporation. Projects under this initiative include the following:

  • AR/VR Service (Smart City Experience Zone)

  • Smart Street

  • Smart Park

  • Smart Facilities

A video of the Sejong City Smart City Initiative is available on YouTube: https://www.youtube.com/watch?v=beSEhFawY_I&feature=youtu.be.

city
Figure 1. visionary smart city

The Korea Land and Housing (LH) Corporation sponsored this OGC Pilot that complements the work being advanced in the Sejong Smart City Initiative.

4.2. Overview the ER

This ER is organized as follows:

Section 5 introduces the concept of a 3D IoT Smart City Platform and its main components, 1) outdoor 3D City Model (CityGML), Indoor 3D model (IndoorGML), Geo-IoT (SensorThings API). It describes the core concept of the integration of implementations of the SensorThings API and 3D Building model, representing both Indoor and Outdoor environments.

Section 6 analyses the use cases in more detail and develops a software architecture to implement a 3D IoT Smart City Platform. It provides recommendations on preferred strategies.

The concept of the 3D IoT Smart City Platform described in section 6 has been implemented by the participants of this Pilot. The result is not one unified system but the implementation of the two main use cases on outdoor air quality and indoor occupancy. Some components have been used in both use cases, others are specific for one use case only. The Technology Integration Experiment (TIE) tables give a good overview of the components and how they are used in the different prototypes.

The WFS model server, with an OGC API - Features interface, is used in both use cases as well as in data preparation as documented in section 7.1.

Section 7.2 documents the implementation of the first use case on the Outdoor 3D City Model and outdoor air quality sensors, esp. real-time monitoring on micro-dust.

Section 7.3 focuses on the Indoor Building Model and indoor sensors such as real-time monitoring on indoor occupancy.

Section 8 provides a summary of the main findings and discusses links to other tasks such as deployments of implementations of OGC API - Features, WPS, and 3DPS.

Appendix A provides the API definition of the WPS to get access to the spatial interpolation of the air quality measurements as developed in this pilot

5. Concept of 3D IoT Smart City Platform

5.1. Goal

The goal of the pilot was to advance the use of open standards for integrating environmental, building, and internet of things (IoT) data in Smart Cities. Under this initiative a proof of concept (PoC) was conducted to better understand the capabilities to be supported by a 3D IoT Smart City Platform under the following standards:

  • Fully textured building models represented in CityGML LOD (Level of Detail) 2

  • IndoorGML Model of Building interior

  • An implementation of OGC API – Features deployed and configured to deliver 3D Building Models including Building interior (referred to as WFS model server in this engineering report)

  • 3D Portrayal Service to stream 3D content for Web-based visualization using glTF and the OGC community standard 3D-Tiles

  • SensorThings API to serve the sensor data

  • WPS to provide a spatial distribution model of measured data

The scenarios selected to demonstrate this concept include:

  • Real-time monitoring on indoor occupancy of a building

  • Real-time monitoring on micro-dust concentration in an urban district

The test area of this Pilot was Sejong City. The district Sejong 5-1 is the site of a wide-ranging Smart City Initiative, led by the Korea Land and Housing (LH) Corporation. A CityGML model of the district has been made available. However, the CityGML model was to be processed on a server hosted in South Korea. For the 3D GeoPortal, the CityGML model was provided as a glTF model via an implementation of OGC API - Features. In addition, a 3D-Tiles data set was made available as a secondary data store derived from the CityGML model. One building in the district was made available as an IndoorGML model. In this pilot, outdoor air quality measurements had been connected with the 3D building model to visualize the air quality of the district in real time. From a technical point of view, it required a way to integrate the measurements and the 3D building model either on the client or on the server. The measured data was provided via a SensorThings API. In this pilot, both measured and synthetic observations have been used for test purposes. In the second use case, the occupancies of rooms and floors of a building interior have been connected with an IndoorGML model. The occupancy data was provided again via a SensorThings API. In this pilot, only synthetic data of occupancy was used.

5.2. Conceptual Model

One key question of this pilot was how to integrate observations such as air quality measurements with 3D models of the built environment. This is a fundamental concept in Smart Cities, as almost all use cases require the integration of environmental and internet of things (IoT) data with City Objects such as buildings. The concept used here is explained in detail to ensure that there is a common understanding of the different elements as well as the used terms.

The objects in the real-world can be defined as a set of phenomenon space A — {a1, a2 , …​, an} and a set B — {b1, b2 , …​, bm} which can be derived through observation from the phenomenon space A.

  • f: A → B

  • b = f(a), a ∈ A, b ∈ B

An example is the case of the sensor systems are installed in one building observing the number of people and Carbon Dioxide (CO2) concentration in room 1. In this case, the phenomenon space is a room, and A is a set of rooms. A function f0: A → B0 maps the number of people to a room. B0 is the set of natural numbers ℕ. A second function f1: A → ℝ maps the CO2 concentration of a room in ppm.

  • A — Set of rooms (a1, a2 , …​, an)

  • f0 — The number of people [people]

  • f0: A → ℕ

  • f1 — The CO2 concentration [ppm]

  • f1: A → ℝ

  • b01 = f0(a1) — The number of the people in room 1

  • b11 = f1(a1) — The CO2 concentration in room 1

5.2.1. Model with a time space

To include time depended measurements into the model, the functions are depending on the time space which can be described as follows:

  • f: A x T → B

  • b = f (a,t) example

  • bmn,tp = fm(an,tp) — the property m in area n at time p

5.2.2. Sensor view

In the view of sensors in the real-world, they are observing the properties(f) of phenomenon space (A) at a time(t). For example, the sensors observing the number of people and CO2 concentration in room 1 at time p can be described as follows:

  • f: A x T → B

  • b01,tp = f0(a1,tp) — the number of the people in room a1 at time tp

  • b11,t0 = f1(a1,tp) — the CO2 concentration in room a1 at time tp

5.2.3. Feature view

A feature is an abstraction of real world phenomena (OGC 08-126). Within the context of this pilot, a feature or object can further be considered to be an element of the phenomenon space which is described by several properties. These properties can be either time dependent or time independent.

  • F: (A, f0(a,t), f1(a,t),…​, fn-1(a,t), g0(a),…​gm-1(a))

  • f — time-dependent properties

  • g — time-independent properties

  • n — number of time-dependent properties

  • m — number of time-independent properties

5.2.4. Relation to the SensorThings

In SensorThings, there are two links to features in the world. Thing entities refer to those physical objects or systems in the real-world directly occupied and monitored by sensors (corresponding to Platform entities in the Observations and Measurements formalism). SensorThings observations are also connected to FeatureOfInterest (FoI) entities that have one or more properties or attributes whose values can be estimated as a result of a sensor or IoT device observation. These attributes are listed and described in the ObservedProperties entity. The sensors and IoT devices are listed and described in the Sensors entity. The distinction between Thing and FeatureOfInterest is critical for remote sensing situations, however, for the in-situ sensors utilized in this Pilot, it is not necessary to distinguish Things and FeatureOfInterest entities. For Pilot purposes, information about the real-world entity being observed was largely maintained in the Thing entity.

The SensorThings API provides an open and unified way to interconnect IoT devices over the Web as well as interfaces to interact with and analyze their observations. The foundations of the SensorThings API are the relational connections between entities in the system and the way they are used to model systems in the real world. The entities have a natural relationship which enables any IoT sensing device from any vertical industry to be modelled in the system. An IoT device or system is modeled as a Thing. A Thing has a Location with one or more Datastreams. Each Datastream observes one ObservedProperty with one Sensor and has many Observations from the Sensor. Each Observation read by the Sensor estimates the value of an observed / observable property for one particular FeatureOfInterest. Together, these relationships provide a flexible standard way to describe and model any sensing system (OGC 15-078r6).

According to the conceptual model, as we want to integrate the building data and IoT data together, the Thing entity (or equally FoI) refers to a set of objects or physical systems (A — {a1, a2, …​, an}) which are systems of buildings or building parts such as room, wall, roof etc. Each Thing contains a link referring to their associated building objects in the CityGML models containing all the building information. The time-independent results (g0..n(a0..m)) can be stored as properties of the Thing / FoI while the time-dependent results (f0..n(a0..m,t0..p)) are stored in the Datastream entity collecting the raw time-series sensor data. For example, a CO2 sensor system installed in room A measuring the CO2 concentration can be modeled in a SensorThings UML diagram as in Figure 2.

UML Example
Figure 2. Example modeled SensorThings UML

If the sensor Observations data is post-processed by a process tool resulting in a new set of computed Observations, then the SensorThings entities have to be updated as follows. The Sensors resource is updated to describe the process tool. The ObservedProperty resource can either remain the same or be updated. The Thing and FeatureOfInterest resource are updated to collect the process tool information with association links to the 3D city model and the original sensor system. For example, if the WPS tool is used to compute the air quality index (AQI) or CO2 concentration of floor B based on data from all rooms in floor B. This system can be modeled in a SensorThings UML diagram as in Figure 3.

UML Example wps
Figure 3. Example modeled SensorThings UML with post-processed data
5.2.4.1. Deriving Higher-Level Observations

SensorThings API also enables the continuous processing of Observations from multiple Datastreams to generate a higher-level Observation. Conceptually it can be described as follows:

  • B0 — Set of observations from the phenomenon space A0

  • B1 — Set of observations from the phenomenon space A1

  • B2 — Set of higher-level observations describing the phenomenon space A2, and derived from other observations

  • f: B0 x B1 x T → B2

  • b2 = f(b0, b1, t), b2 ∈ B2

For example, dew point temperature can be calculated with observed air temperature and relative humidity.

  • B0 — Set of air temperature observations

  • B1 — Set of relative humidity observations

  • B2 — Set of dew point temperature observations

  • b2 = f(b0, b1, t) — dew point temperature can be approximated by using the following formula: dew point temperature = air temperature - ((100 - relative humidity)/5)

In many cases, a higher-level Observation is derived from one set of Observation, i.e., from the same Datastream. For example, the speed of a moving feature can be derived from the moving feature’s location_observation1 in t1 and location_observation2 in t2.

In practice, higher-level Observations can be derived through the chaining of multiple SensorThings API implementations through the publish/subscribe-based MQTT protocol. The following diagram Figure 4 describes the concept.

STA service chaining
Figure 4. Higher-level observations derived from multiple SensorThings Datastreams

5.2.5. Summary

In the pilot, the measured data was provided as raw data in both use cases without chaining of multiple SensorThings API services. In the case of air quality measurement, the data was either visualized as a diagram in the 3D GeoPortal as measured, or an interpolation was calculated using all measurements in a given area by means of a WPS. One example of chaining SensorThings API implementations could be the aggregation of air quality measurements over time, e.g. to provide an hourly average of the air quality measurement. In the case of the occupancy sensor, the data is not based on real observations, but synthetic ones by an algorithm. In a real-world application, sensing the number of people in a given area typically requires chaining implementations of the SensorThings API that process several sensors such as camera systems and interpretation of the imagery. Since the focus of the pilot was on the integration and validation of the interfaces, a simplified synthetic occupancy sensor approach was chosen.

In both Pilot use cases, given the in-situ nature of the sensors, FeatureOfInterest, and the Things could be considered to refer to the same physical entity. One way to link the Thing and Observation with the feature and its properties would be by way of the CityGML Dynamizer extension that will be part of CityGML 3.0. It extends the CityObject in CityGML and introduces links to the relevant SensorThings API. An alternative approach adds the unique identifier of the CityObject to the Thing in the SensorThings API and maps the Observation to the attributes of the CityObject. This approach does not require an extension of CityGML. As the CityGML model was not accessible outside South Korea, this extension of the CityGML was more or less not doable. The integration of SensorThings API and the 3D City model has been implemented by linking the Thing to the CityObject via a unique identifier. It is important to notice that this approach requires a stable identifier in case of an update of the model.

6. Architecture of the 3D IoT Smart City Platform

The software architecture adopted to implement a 3D IoT Smart City Platform is described in this chapter.

6.1. Use Cases and Activity diagrams

6.1.1. Use Case 1: air quality

The aim of this use case is the 3D visualization of a 3D city model together with outdoor air quality measurements. It includes two stakeholders:

  • the facility manager who has an interest in monitoring the outside air quality, and

  • the administrator of the 3D Geo-Portal

Other stakeholders such as citizens are represented by the facility manager use case in this 3D IoT pilot. The facility manager is also responsible for the maintenance of the sensors. However, in this pilot it is assumed that the sensors do not need maintenance.

UseCase 1
Figure 5. Use Case diagram
6.1.1.1. Use Case 1-1: Monitor the outside air quality using the 3D Geo-Portal

The facility manager uses a web-based system to monitor the current air quality. The air quality is measured by a number of sensors distributed in the Sejong area, for example in the lamp posts along the main streets. The measurements are visualized in real time in a 3D environment together with a 3D city model to get a better understanding of the air quality in along the streets and the built environment. In the pilot, only fine dust PM2.5 is taken into account as an indicator of air quality for reasons of simplicity. As air quality is a continuous phenomenon, the sensor measurement is interpolated in real time to get a distribution of the air quality in space. The air quality distribution is simplified by using an Inverse Distance Weighted (IDW) interpolation. The facility manager can get access to the current and historic measurements of every single sensor. The historic measurements are then shown as a line chart diagram in the 3D viewer.

6.1.1.2. Use Case 1-2: Administration of 3D Geo-Portal

The administrator of the web-based service - the 3D GeoPortal - has to prepare the 3D model for web-based 3D visualization. In addition, the sensors have to be registered and integrated into the 3D model to ensure that the sensor readings are visualized in the correct 3D location.

6.1.1.3. Activity Diagrams Use Case 1-1
6.1.1.3.1. Visualizing a 3D scene with real time outdoor air quality using 3D Portrayal Service

The activity diagram in Figure 6 shows a general approach to get a 3D scene including a 3D building model and air quality data based on sensor measurements. The client selects a region of interest defined by a rectangular area. The 3D building model is retrieved via a 3D Portrayal Service for the specified area. The data delivery format can be specified in the request. In general, for larger 3D scenes, the data delivery format has to support streaming of a tiled data set such as those conforming to the OGC community standards Indexed 3D scenes (I3S) or 3D-Tiles. In this 3D IoT pilot, 3D-Tiles was used in all implementations. In this Activity Diagram, the terrain model of the 3D globe is used. No additional terrain data is provided. The client may need to project the 3D building model to the terrain model of the globe just to avoid a visual mismatch of the building geometry, and the terrain model that might appear due to different source and resolution of the building model and terrain ("flying buildings").

In a second request, the air quality sensors within the specified area are selected from a SensorThings server. Each Sensor supports multiple data streams of different measures of phenomena. In this Use Case, each sensor provides one data stream on fine dust PM2.5. Time resolution may differ from sensor to sensor.

The client visualizes the data streams of the air quality sensors. Each data stream can be visualized as a line chart to show the exact sensor readings over time. In addition, the measured data of all sensors at a given point in time can be interpolated to show the spatial distribution of the air quality. Within the scope of the 3D IoT Pilot, an IDW interpolation is sufficient for this purpose.

To summarize the flow of information:

  1. select a region of interest by using a 3D Portrayal Service

  2. fetch data streams of all air quality sensors within this region

  3. interpolate and visualize air quality measures in real time at client

Activity UseCase 1 1 a
Figure 6. visualize 3D scene with real time outdoor air quality using 3D Portrayal Service
6.1.1.3.2. Visualizing 3D scene with real time outdoor air quality using predefined area

Th Activity Diagram in Figure 7 is similar to the above one. The only difference is that it loads a predefined area - Sejong - by a URL instead of using the 3D Portrayal Service API to query a region from the 3D GeoPortal. All participants worked with the same 3D model of the Sejong area and used 3D Tiles for content delivery in this pilot. In this case it is sufficient to provide a predefined 3D Tileset for web-based visualization.

The main difference is the request to fetch the 3D building geometry:

The 3D Portrayal Service retrieves the 3D Buildings of the area of Sejong (with CRS:84 bounding box coordinates of 127.238631,36.478551,127.260261,36.492008) through a request that looks like:

http://193.196.37.89:8092/service/v1?service=3DPS&acceptversions=1.0&request=GetScene&layers=building&format=application/json&boundingbox=127.238631,36.478551,127.260261,36.492008

The request returns the JavaScript Object Notation (JSON) key pair value with the URL to the tileset.json.

http://193.196.37.89:8092/Assets_3diot/sejong/tileset.json

This tileset can be retrieved directly if it is generated in a batch process and persistently stored on the 3D GeoPortal using the same URL: "http://193.196.37.89:8092/Assets_3diot/sejong/tileset.json"

To summarize the flow of information:

  1. get predefined 3D scene (Sejong area) by URL

  2. fetch data streams of all air quality sensors within this region

  3. interpolate and visualize air quality measures in real time at client

Activity UseCase 1 1 b
Figure 7. visualize 3D scene with real time outdoor air quality using predefined region
6.1.1.3.3. Using a web processing service to interpolate air quality data

Instead of doing the interpolation of the air quality measurements at the client, it can be done using a WPS at the back end. This will shift computational load from the client to the server and may allow more complex interpolation methods later.

To summarize the flow of information:

  1. get predefined 3D scene (Sejong area) by URL

  2. fetch data streams of all air quality sensors within this region

  3. WPS receives air quality sensor data from Sensor Things API

  4. WPS interpolates sensor data and sends a coverage / map to the client

  5. client visualizes air quality "map" in real time

Activity UseCase 1 1 c
Figure 8. Activity Diagram using a WPS to interpolate air quality data
6.1.1.4. Activity Diagrams Use Case 1-2
6.1.1.4.1. Registration of Air Quality Sensors

The air quality data shall be measured by sensors. However, to set up a test environment, it is helpful to generate synthetic air quality measurements by a "property estimator" process. It should be taken into account that measurements of different sensors usually do not have the same time stamp nor the same time interval. In addition, it is most likely that different sensors from different manufacturers are used in a real-world scenario. Due to the lack of standards, these sensors usually use different data formats for the sensor readings. The SensorThings API collects and stores all these different sensor datasets. The Sensor Things API enables a unified access to all the sensor readings, in this case PM2.5 fine dust measurements. Besides the data stream, the sensors need to be registered with a fixed 3D location and a unique identifier. In this pilot, the location of a sensor is referenced to the World Geodetic System 1984 (WGS 84) datum, but with height above ground.

Activity UseCase 1 2 a
Figure 9. Activity Diagram using both synthetic air quality data as well as measured one
6.1.1.4.2. Preparation of the 3D model

Under the assumption that the 3D city model is available in some kind of 3D data store, the region of interest is retrieved from the data store by a region query. The resulting city model, in this case a 3D building model only, is stored as a CityGML document. This CityGML document is then converted to a tile-based format to support streaming within the format as well as a non-tiled format. In this case, the client needs to come up with a streaming strategy by itself.

In this Pilot, all implementations are based on the Cesium globe. The CityGML building models will be converted to 3D Tiles and to glTF. The entire process is straight forward, different tools can be used to convert the CityGML document to 3D Tiles and to glTF. The resulting glTF models, and tileset.json together with the hierarchical tile set will be stored at the 3D GeoPortal with a unique URI. The Activity diagram in Figure 10 shows the generation of the tiled data set. The generation of the glTF model follows the same process.

Activity UseCase 1 2 b
Figure 10. Activity Diagram Preparation of 3D model

6.1.2. Use Case 2: IndoorGML and Occupancy

The second use case is similar to Use Case 1, but with a focus on building interior and the observation of the occupancy of an interior space. The aim of this use case is the 3D visualization of a 3D building model including an indoor model together with occupancy observation. It includes two stakeholders:

  • the facility manager who has an interest in monitoring the occupancy of an interior space such as a shop, and

  • the administrator of the 3D Geo-Portal

Other stakeholders such as citizens are represented by the facility manager use case in this 3D IoT pilot. The facility manager is also responsible for the maintenance of the sensors. However, in this pilot it is assumed that the sensors do not need maintenance.

UseCase 2
Figure 11. Use Case diagram 3D GeoPortal to Monitor Occupancy of an Indoor Space
6.1.2.1. Use Case 2-1: Monitor occupancy of an interior space

The facility manager uses a web-based system to monitor the occupancy of interior spaces. On an abstract level, this use case is similar to Use Case 1-1. However, the interactive visualization of the building interior is an additional challenge. Location based Augmented Reality shall be used in addition to a virtual reality 3D globe. Another challenge is the use of sensors to observe the occupancy of an interior space. A virtual sensor gives the number of people in a given space. However, this is the result of a cascading sensor system, for instance one sensor measures the CO2 in ppm and a set of camera sensors observe the space. Based on an algorithm, the number of people can be derived from these measurements. In this pilot, the virtual sensor generated synthetic data. Consequently, the architecture took the cascading sensor system into account, as it is an interesting use case for the use of the SensorThings API.

6.1.2.2. Use Case 2-2: administration of 3D Geo-Portal

The administrator of the web-based service - the 3D GeoPortal - has to prepare the 3D model for web-based 3D visualization. In addition, the sensors have to be registered and integrated into the 3D model to ensure that the sensor readings are visualized in the correct 3D space. The occupancy is measured not at a 3D location, but in a space such as a room. The observed space in represented with a 3D geometry in IndoorGML. The sensor and the observed space have to be linked in this use case.

6.1.2.3. Activity Diagrams Use Case 2-1
6.1.2.3.1. Visualizing a 3D scene with real time occupancy of an interior space

The activity diagram in Figure 12 shows a general approach to get a 3D building model including building interior in IndoorGML and occupancy data based on sensor measurements. In this Activity Diagram, the terrain model of the 3D globe is used. No additional terrain data will be provided. The client may need to project the 3D building model to the terrain model of the globe just avoid a visual mismatch of the building geometry and the terrain model that might appear due to different source and resolution of building model and terrain.

In a second request, the occupancy sensors within the specified part of the building will be selected from a SensorThings server. Time resolution may differ from sensor to sensor.

The client visualizes the data streams of the occupancy sensors. One occupancy sensor counts the number of people in a room or a predefined cell of the building Each data stream can be visualized as a line chart or a color encoding to show the exact sensor readings over time.

To summarize the flow of information:

  1. select the building of interest by using OGC API - Features interface of a WFS model server / IndoorGML

  2. fetch data streams of all occupancy sensors within this building

  3. visualization of occupancy of each room and/or cell in real time

Activity UseCase 2 1 b
Figure 12. visualize 3D scene with real time occupancy using a predefined building model
6.1.2.4. Activity Diagrams Use Case 2-2
6.1.2.4.1. Registration of Occupancy Sensors

The occupancy of a given space - let it be a single room, or a large open space divided into a set of cells - is monitored by a virtual sensor. This virtual sensor is based on a cascading sensor system that observes the space. An algorithm calculates the resulting occupancy based on these observations. The virtual sensor can be accessed via the SensorThings API. It has to be linked to a representation of the same space in IndoorGML by the administrator of the 3D GeoPortal.

6.1.2.4.2. Preparation of the 3D model

Under the assumption that the 3D building model is available in some kind of 3D data store, the region of interest is retrieved from the data store by a region query. The resulting 3D building model is stored as an IndoorGML document. This IndoorGML document is then converted to glTF as a non-tiled compressed data format for 3D visualization.

Activity UseCase 2 2 b
Figure 13. Activity Diagram Preparation of 3D model

6.2. Overall Architecture

Based on the Use Cases and activity diagrams, three components of the overall architecture have been identified. The Data layer includes the data sources such as the 3D City Model in CityGML and 3D Tiles, the 3D Building model in IndoorGML, and Sensor data. The data can either be stored in a database or a file-based resource. On top of the data layer, services grant access to the data. These services can be data delivery services or processing services. A very simple API just grants access to a file resource such as direct access to a 3D tiles resource. The server component can be seen as the backend of a 3D GeoPortal. The client in this pilot is a web-based client in all use cases.

overall Architecture stt
Figure 14. Overall architecture

Three alternatives have been discussed in the pilot within this architecture. In the SensorThings service content enrichment approach, an “Agent” invokes the Property Estimator (Web Processing Service) with sensor readings and relevant city / building objects and the results are posted back to SensorThings as derived observations on identified Thing / Features of Interest

In the second approach City / Building model enrichment, the “Agent” invokes the Property Estimator (WPS) with sensor readings and relevant city / building objects and the results are posted back to the WFS model server as observed (dynamic) properties of city / building objects

The third alternative Geo-Portal enrichment is Geo-Portal centric. The Geo-Portal fetches and visualizes both building / city objects and relevant sensor observations, and invokes the Property Estimator on this content (or references) and re-renders building / city objects according to the results

Most of the implementations follow the Geo-Portal enrichment approach in this pilot. In this pilot, several Geo-Portals have been implemented to test variants in the workflow as well as the relevant OGC APIs. The following sub-chapters give a short overview of the different approaches. Details on the implementation are documented in the next chapter.

6.2.1. Overview GeoPortal Cyient

architecture1.0
Figure 15. Workflow of things and GML
6.2.1.1. Air Quality Index and Indoor Occupancy

Air quality index data getting from the OGC SensorThings API, which include all components which will affect AQI like Carbon Monoxide (CO), Sulphur Dioxide (SO2), Ozone (O3) …​ etc, along with location details (latitude, longitude, height). In the same way occupancy data also works.

6.2.1.2. IndoorGML & CityGML

IndoorGML was converted into tileset data which is supported by FME (feature manipulation engine) or Cesium Command-line interface (CLI). In IndoorGML, all layers were separated depending upon data, like roof surface, floor surfaces, wall surface …etc. Then on and off layers also possible. CityGML was also converted into tileset data through FME, and visualized on a portal as well, with minor adjustments like terrain, offset.

6.2.1.3. 3D-GeoPortal

In the portal tilesets of IndoorGML and CityGML were visualized. On the top of tileset data serialized as CityGML AQI data, other data obtained from the SensorThings API was displayed, with devices color-coded based upon thresholds of individual parameters and AQI as well. Inside the tileset serialized as IndoorGML, occupancy sensor data was displayed. On and off control of IndoorGML layers was controlled through the portal.

6.2.2. Overview GeoPortal Gaia3D

ER Gaia3D G7
Figure 16. Workflow of GML and Sensor data, Indoor occupancy.
6.2.2.1. GML

The steps illustrated in Figure 16 are explained as follows and indicated through parenthesis. The IndoorGML model was parsed for the geometry and the attribute of the CellSpace of IndoorGML was saved at the local(1). After parsing, the indoor geometry was visualized using Gaia3D – a globe platform based on 3D WebGL (2). With parsed data, we calculate the middle point of the CellSpace geometry to use the point as the position for visualizing indoor occupancy data(5) later.

6.2.2.2. Sensor data visualization

A query was sent to the SensorThings API with the following API path (3) to get the location of the sensors, the phenomenon time of the observation and the result value of the observation to track the progress history of the sensor’s value.

/Locations/Datastream/Observation

Per every 10 seconds the query was sent to refresh the data of the sensor. With the location data and the result value of sensor’s observation, the sensor’s position and value on the globe was visualized (4). The User can then review the history of the sensor data from the graph.

6.2.2.3. Indoor occupancy data visualization

At (1) is IndoorGML’s data was parsed into two parts: the geometry and the data of CellSpace. Through GML ID of CellSpace, the Indoor occupancy data was requested from WPS server (5). Indoor occupancy data is then presented at the position that was calculated at (1). Pre-processed data in JSON was used for visualization(6) and statistical analysis. The workflow is similar to that of sensor data visualization.

6.2.2.4. 3D GeoPortal

At the 3D GeoPortal, the geometry of the IndoorGML including the network and the location of the occupancy is visualized. For intuitive sight, each room of the building is colored to represent the value of the occupancy. Visualization of the occupancy value history graph is supported on the portal.

6.2.3. Overview WPS Helyx

6.2.3.1. Overview of OGC API-Processes (WPS) Property Estimator Implementation

The position of the Property Estimator API within the architecture of the pilot is potentially a complex one. The API could be designed to support a range of implementations and use cases to supplement the SensorThings API readings.

For the purposes of this Pilot, the Property Estimator API can be considered an "aggregation model" sensor to support four identified use cases. The functionality of these four use cases ranges from standard request-response client-server interactions to purely server-to-server interactions. These are listed below from simple to complex.

  • The Request-Response Client-Server process: This use case is the most traditional approach. The Client requests an aggregation from the Property Estimator API for a location or feature, which in turn fetches the relevant information from the Source SensorThings API (STAPI) services, calculates an aggregation and returns this to the client.

  • The Pre-Calculated process: This use case is similar to the first, with the Property Estimator API subscribing to the Source STAPI services. However, once the data is retrieved the readings are incorporated into a more complex persisted space-time aggregation model. This runs as a separate process to the dissemination of the aggregation results. Client applications can then send a request to the Property Estimator API for an aggregation and the process can draw upon the persisted model to provide a result. This use case also requires a defined configuration from which the Property Estimator API can build the model.

  • The Event-driven process: This use case treats the Property Estimator API as an ETL (Extract Transform Load) tool which sits between the Source STAPI services and the aggregation STAPI service. The API retrieves inputs from the Source STAPI services by subscribing to their MQTT endpoints. This can be considered the Export component of the API. The API then transforms the retrieved readings to a spatiotemporal aggregate. The API can then POST this aggregate to the STAPI aggregation service. This is can be considered the Load component of the event driven workflow. This use case requires a defined set of STAPI Features of Interest for the API to subscribe to.

  • The "agent" driven circular STAPI process: This use case is an alternate event-driven process managed by an agent. The agent retrieves the defined STAPI Features of Interest from the aggregate STAPI service and then uses this to trigger the same process as use case two. The nature of this "agent" is at present abstract. It could be fulfilled by the client or by another scheduled or smart process within the Property Estimator API.

The technical implementation for this pilot covered the first two of these approaches, with the technical architecture in place to satisfy the third approach. In order to do so the implementation was flexible, light weight and only focused on the necessities. This prioritized the end utilization rather than the need to produce a full production ready implementation. Hopefully given the results of this implementation a number of decisions can then be made regarding which is the most appropriate use case(s) to support going forward.

The Property Estimator API component can be broken down into 3 parts:

  • The API exposed to the client and the STAPIs. This includes how the API should be structured and what standards it should follow.

  • The property estimation. This includes how the estimations are calculated, for both occupancy and air quality, and how the input data is incorporated.

  • The output process. The nature in which the data is returned to the requester, potentially accounting for whether the requester is a service or client.

The API structure took inspiration from the Routing Pilot work conducted in 2019, which extended the draft OGC API – Processes standard. This is the most recent implementation of an OpenAPI inspired processing service, and is the closest the pilot participants had to a proto-standard processing service, along-side the draft OGC API - Common specification and OGC API - Features standard. That said, the scope of this pilot may not allow for a full HATEOAS (Hypermedia as the Engine of Application State) implementation given the flexibility required to support all of the other components. The API components exposed to the client should be sufficient to support the first two use cases. From the client perspective this is fairly straight forward. Only a few endpoints need be exposed to allow for the client to request an aggregation. This satisfied the client aspects of approaches 1 and 2, and the same endpoints could be used for approach 3.

The request JSON payload structure depended on the type of estimation required, either air quality or occupancy. The proposed example structure for air quality is below, for location estimate.

{
  "name": "airReadingRequest1",
  "air readings": [
    {
      "aggregation type": "on-the-fly",
      "default sensor type": [
        "PM2.5"
      ],
      "default radius": 100000,
      "default start time": "2019-11-28T04:28:58.704Z",
      "default end time": "2019-11-28T04:41:49.838Z",
      "default sensorThing API": "SensorUp",
      "centroids": [
        {
          "type": "Feature",
          "geometry": {
            "type": "Point",
            "coordinates": [
              127.3005228, 36.6296889
            ]
          }
        }
      ]
    }
  ]
}

The proposed example structure for air quality is below, for GMLID Feature estimate.

{
  "name": "string",
  "air readings": [
    {
      "aggregation type": "on-the-fly",
      "default sensor type": [
        "PM2.5"
      ],
      "default radius": 100000,
      "default start time": "2019-11-28T04:28:58.704Z",
      "default end time": "2019-11-28T04:41:49.838Z",
      "default sensorThing API": "SensorUp",
      "GMLIDs": [
        {
          "ID": "UUID_4552ad98-c383-48c2-a36b-fc517b2c3ffa"
        }
      ]
    }
  ]
}

The proposed example structure for occupancy is below.

{
  "name": "string",
  "occupancy readings": [
    {
      "default radius": 100000,
      "default start time": "2019-11-28T04:28:58.704Z",
      "default end time": "2019-11-28T04:41:49.838Z",
      "default sensorThing API": "SensorUp",
      "GMLIDs": [
        {
          "ID": "UUID_4552ad98-c383-48c2-a36b-fc517b2c3ffa",
          "start time": "2019-05-21T18:25:43-05:00",
          "end time": "2019-05-21T18:25:43-05:00"
        }
      ]
    }
  ]
}

Two methods for property estimation were required:

(1) Simple property estimation: This provided an estimation for a single point given the input parameters in the request payload. This single point was either chosen by the user or derived from the users chosen GMLID. The air quality estimation used the centroid x,y,z, the radius from centroid, start and stop times and a sensor type defining the particulate. This information was then used to take an average through time, retrieving information from all of the sensors that fall within the chosen 3D spherical radius. For the occupancy estimation all of the ID elements within the chosen GML ID element were checked to see which elements have associated sensors. These sensors were then used to take an average number of people in the chosen element. This satisfied the simple asynchronous processing component.

(2) Persisted property estimation: This estimation created a persisted spatiotemporal model. The model was represented by raster data sets, each representing an area and height range (or bin) for a specific day. In order to create these raster datasets the persisted model accepted a configuration POSTed to the 'administer' endpoint of the API. This configuration provides information required by the model, including the chosen STAPI from which to build the model, the sensor type to base the model on and the minimum and maximum bounding box coordinates for the model extent. Once this configuration is received, the process checked that there were sensors for the chosen sensor type, on the chosen STAPI in the chosen area. If this is confirmed an MQTT client connection was made between the Processes API and the chosen SensorThings API, to observe all FeatureOfInterest updates. When an observation is received the process checked that the response matched the configuration criteria and if so added the data to the appropriate point dataset. Every time a data set was updated and had more than 3 point values, the IDW Interpolation was run to create the interpolated raster for that specific point dataset. Once the model had been running for a while successfully retrieving regular MQTT updates from the chosen STAPI, a catalog of raster datasets was generated. When an estimate request is made by the user specifying the "aggregation type" as "persisted" the user receives a link to a resource on the estimate endpoint. This JSON resource contains a list of links to the raster data sets that satisfy their estimate request. The user can then choose to download all or a subset of these raster data sets to display or interrogate on the client side. This satisfied the persisted model processing component and such a model could be drawn upon by any of the above approaches. Due to the scope of this pilot, this estimation process was constrained to just air quality.

These estimation processes relied on the SensorThings API storing a GML ID within either the FeatureOfInterest elements or Thing elements to associate sensors with parts of buildings. The result of the estimation request was stored as a resource at the estimation endpoint of the API, with the client being given the location of this resource in the 'Location' header of the POST response.

The implementation of the above approach is outlined in section 7.

6.2.4. Overview SensorThings API SensorUp

SensorUp’s role in the pilot was to provide two SensorThings API services with simulated observations. One SensorThings API implementation offered simulated indoor occupancy data and the other offered simulated PM2.5 data. Figure 17 describes the components that SensorUp developed to create the simulated data.

sensorup sta simulator architecture
Figure 17. Architecture of the SensorUp PM2.5 and Indoor Occupancy Simulator

6.2.5. Air Quality Simulator

SensorUp provided synthetic fine dust PM2.5 observations for the five selected air quality stations. Four steps have been used to create the simulator:

  • Selecting the location of five air quality stations;

  • Considering 26 air quality stations around real stations;

  • Appling Random Walk method to estimate synthetic observations for 26 air quality stations;

  • Calculating the synthetic observation for each real station utilizing IDW interpolation and pushing calculated observations to the STAPI;

Step 1: Five air quality stations were selected. The criteria for selecting these five stations was that they were the closest stations to the area of study in this pilot provided by aqicn.org. The five air quality stations were called “US” because their synthetic PM2.5 observations are unknown and should be calculated by the simulator. Their names and locations are summarized in the following Table.

Table 1. Selected Air Quality Stations
Station name Location STA link to the Thing

Osong-eup

(127.3005228, 36.6296889)

link

Hansol-dong

(127.252529, 36.474172)

link

Areum-dong

(127.249653, 36.5177469)

link

Bugang-myeon

(127.370516, 36.527029)

link

Sinheung-dong

(127.292253, 36.592906)

link

Step 2: In this step, 26 stations have been randomly selected around real stations (i.e., “US” stations). They were called “KS” because it is assumed that their PM2.5 observations are known. In other words, their PM2.5 observations were estimated using the Random Walk method [https://en.wikipedia.org/wiki/Random_walk].

Step 3: In step 3, firstly, to start the process of simulating the PM2.5 observations for “UK” stations, initial synthetic PM2.5 observations for “KS” stations was needed. Six classes describing the index for the air quality were considered. Then, each of those 26 “KS” stations was randomly assigned to an air quality class. Air quality classes have been extracted by considering the Air Quality Index Scale and Color Legend provided by [aqicn.org]. The properties of each class are shown in Figure 18. Secondly, the random walk method was applied to estimate smoother synthetic PM2.5 observations for each “KS” station. So, every 10 seconds, a new PM2.5 value was estimated based on the random walk method for each of those 26 “KS” stations. It is worth mentioning that the walking value is set to be 20 ug/m3.