Recent technical developments in Digital Twins

The last Helsinki Loves Developers meetup of this year was organized in November 2020 by Forum Virium Helsinki. Webinar with the title “Digital Twin for Developers” was a part of their FinEst Twins Digital Twin Masterclass . Theme of the event was to provide technical introduction to two new elements in the digital twin development: the OGC API for Features that is a recent and improved version of the WFS API and CityJSON which will offer developer-friendly encoding of the CityGML data model when finished.

Digital twins are deemed to be the next revolutionary thing in design, whether we talk about designing cities or commercial products. Digital twins utilized in urban design are defined as “realistic digital representations of assets, processes or systems in the built or natural environment” by the Gemini Principles. In Helsinki, the first complete city model was created in 2001, and with the advancement of technology Helsinki 3D+ team is now building a comprehensive digital twin of the city. It will aid planning and simulating of the city in all areas of life through multiple applications.

OGC API for Features is the new black

Creating digital twins is a global group effort through collaboration, and therefore common standards and practices are needed. First presenter of the meetup, Sampo Savolainen (Spatineo Oy), introduced a recently developed standard for GIS APIs. Open Geospatial Consortium has been creating standards and tools for interoperability since 1994 and has e.g. developed widely used GIS standards such as WFS and WMS APIs. However, those developers who have little understanding of spatial data have struggled with GIS APIs which have unique structure compared to APIs used for other purposes. New OGC standards, such as API for Features aim to solve this problem by bringing GIS APIs closer to the developer’s world.

Anatomy of OGC API for Features (also known as WFS 3.0) is the following: it is openAPI, has HTML interface and API access (comparable with get capabilities, get feature etc.). For developers it might be a relief to know that the coordinate reference system of API for Features will always be in WGS84 and can be projected to local systems. The APIs are easy to use in browsers and are RESTful with JSON data.

The OGC API for Features was approved a year ago, and is already used across the globe. In Finland, e.g. National Land Survey of Finland has adopted the API and offers place names, building data and national topographic database to be used with OGC API for Features. Savolainen’s examples of use cases in his presentation all applied two-dimensional data by National Land Survey of Finland, but nothing stops developers from using the standard to 3D data, such as digital twins.

CityJSON has many advantages compared to CityGML

While the OGC API for Features is developed both to 2D and 3D data, a new CityJSON encoding still in development centers around 3D data. Doctoral student in Aalto University, Juho-Pekka Virtanen, introduced the latest development of the CityJSON in the event. In short, CityJSON defines ways to describe 3D features found in cities, such as roads, buildings, vegetation and city furniture. The file portrays both the geometry and semantics of those objects in different levels of detail. CityJSON is an encoding based on JSON, an implementation of the CityGML data model. CityGML is also a standard by the OGC, and it is an open standardised data model and exchange format used to store digital 3D models.

Aim of CityJSON is to offer a simpler and more compact alternative to the GML encoding of CityGML. Benefits of CityJSON include simplicity, compatibility and easy convertibility to CityGML and back. With CityJSON, digital twins are more compact file sizewise. Parsing of CityJSON can be easily done in the browser. Virtanen approaches CityJSON from the viewpoint of research, and in the webinar he even demonstrated how one could write their own JSON file with Python to be applied in 3D models. While doing that, he noted that mainstream tools and applications are needed to make CityJSON a potential option for all developers.

Sun energy potential of building surfaces varies and the variation can be modelled with the help of digital twins.
3D data in action: Helsinki 3D+ team simulates and visualizes sun energy potential on building surfaces. Screenshot from Helsinki Energy and Climate Atlas.

Read more about digital twins here.
Read more about OGC API for Features here.
Read more about CityJSON here.