CityJSON in QGIS: Development of an open-source plugin

Trans GIS. 2020 Oct;24(5):1147-1164. doi: 10.1111/tgis.12657. Epub 2020 Jun 24.

Abstract

When QGIS 3.0 was released in 2018, it added support for 3D visualisation. At the same time, CityJSON has been developing as an easy-to-use JavaScript Object Notation (JSON) encoding for 3D city models using the CityGML 2.0 data model. Together, this opened the possibility to support semantic 3D city models in the popular open-source GIS software for the first time. In order to add support for 3D city models in QGIS, we have developed a plugin that enables CityJSON datasets to be loaded. The plugin parses a CityJSON file and analyses its tree structure to identify all city objects. Then, the geometry and attributes of every city object are transformed into QGIS features and divided into layers according to user preferences. CityJSON parsing was proven to be straightforward and consistent when tested against several open datasets. One of the biggest challenges we faced, though, was mapping CityJSON's hierarchical data structure to the relational model of QGIS. We undertook this issue by providing various methods on how geometries from the model are loaded as QGIS features. We intend to use the plugin for educational purposes in our university and we believe it can be proven a worthy tool for researchers and practitioners.