ArcGIS

CityGML to I3S: Streaming fast 3D city data in ArcGIS

CityGML is an open data model, developed by the Open Geospatial Consortium (OGC), for storing and sharing city related spatial data in an XML based format. Many cities, regions, and even countries have adopted CityGML to store and disseminate city information, especially 3D building representations. CityGML data can be used in a variety of efforts such as in project planning as representations of existing conditions, or in research as a foundation of doing simulation and modeling. In response to users who want to be able to publish and use data from CityGML in the ArcGIS platform to support these kinds of workflows. Esri has partnered with con terra to build a set of tools to convert CityGML based 3D buildings into the OGC Community Standard Indexed 3D Scene Layer (I3S). I3S layers, referred to as Scene Layers, enable users to publish and consume 3D content in web, mobile, and desktop ArcGIS workflows. 

By following the steps in this blog, you’ll be able to convert CityGML files to a Scene Layer Package (SLPK) files. SLPKs are a file format for scene layers that is used for storing, publishing, and even directly reading large 3D data sets. 

Part 1: Knowing your data 

CityGML can store a variety of information including land use boundaries, street furniture, vegetation, and streets. However, for the first conversion tool we have focused solely on 3D buildings. If you have additional types of data that you want to convert into an ArcGIS compatible geodatabase you can use the Quick Import from the Data Interoperability extension to do so. CityGML can store buildings in multiple levels of detail (LOD), signified by a number from 0 to 4, with higher numbers representing greater levels of complexity and detail. (To learn more about the concept of level of detail and graphic complexity, please see this available technical paper. http://bit.ly/GCI-Jan2018) You can choose to extract a specific level of detail, or have the tool automatically choose the highest level of detail available for each building. 

CityGML inherits GML’s handling of Coordinate Reference Systems (CRS) to indicate spatial reference such as projection and datum. CityGML allows well-known CRS, such as the Universal Transverse Mercator projection in the WGS84 datum, and can also use CRS that are locally or uniquely defined within the CityGML document. In some cases, the CRS may be a 3D cartesian coordinate system based on a flat-earth approximation of the earth’s surface for use in engineering applications. You will need to specify the input coordinate system of the CityGML data in order to use the tool. The tool supports a variety of common well-known coordinate systems, as well as the ability to define custom coordinate systems for input CityGML data. 

Some cities provide access to their 3D information in a variety of formats, including CityGML. For example, the city of Berlin provides Level of Detail 2 (LOD2) buildings for download through a web-based application that allows interactive selection of an area of interest. 

Getting CityGML data for Berlin

The Netherlands, Germany, France, Malaysia, and Abu Dhabi and other countries use CityGML to store and disseminate 3D buildings as a component of their National Spatial Data Infrastructure. There is a variety of sample CityGML data available on the OGC website as well, and directly from many cities. 

Examples: 

Part 2: Converting your data 

The Convert Building From CityGML geoprocessing tool is based on the Data Interoperability extension for ArcGIS Pro, and utilizes a Feature Manipulation Engine (FME) Workbench built using Safe Software’s FME. This workbench is designed to work with the default schema for CityGML 1.0 and 2.0. We recognize that many organizations choose to customize their implementation of CityGML, quite commonly with custom attributes. For this reason, we decided to provide not only the Geoprocessing Tool in a Toolbox, but the source Workbench that you can customize to accommodate any unique needs. If you have FME Desktop 2020.0 or newer you can use the workbench directly to convert CityGML files into a Scene Layer Package (SLPK). 

The layout of the FME workbench the geoprocessing tool is based on.

For ArcGIS Pro users we wrapped the workbench in a Geoprocessing Tool. It relies on the Data Interoperability Extensions capability to import and edit workbenches. Open ArcGIS Pro and navigate to the Catalogue window. Right-click afterwards on the “Toolboxes” catalogue and select “Add Toolbox”. A new file selection window will be shown where you can select your previously downloaded “I3SToolbox.tbx” file from your local file storage. Once it is inserted into your Toolboxes you can see the content by double clicking on it. Currently only one geoprocessing tool belongs to it – Convert CityGML to Scene Layer Packages. Double click on the tool to open it. 

Running the Convert Building from CityGML Geoprocessing Tool

You can select one or more input CityGML files you wish to convert. Note that all the CityGML files need to have that same coordinate reference system, which you must specify as a parameter of the tool. Choose where and what to name your output Scene Layer package and convert the building to I3S.

The geoprocessing tool's parameters.

There are a few advanced options associated with the tool. 

Run the tool and ArcGIS Pro will produce your Scene Layer Package (SLPK). 

Part 3: Viewing the result 

Once you have produced a Scene Layer Package (SLPK) there are a variety of ways that you can use and consume it in the ArcGIS platform. 

You should be able to view the file immediately in ArcGIS Pro if you just ran the geoprocessing tool. In the ArcGIS Pro catalog window navigate to the folder where you stored the output SLPK. Drag and drop the SLPK into any scene, and the converted 3D buildings will be displayed. Note, that it may take a bit of time to render if the SLPK is large. These buildings can be used readily as context for urban planning, design context, emergency response, and situational awareness. Although they are a representation of spatial data, rather than the data itself, you can use them in certain types of spatial analysis. For instance, the “Interactive Analysis” tools, listed under the Analysis tab, all honor SLPKs. That means you can do Line of Sight, View Dome, and Viewshed assessment on the 3D buildings, as well as using the interactive slice to see inside them. 

A viewshed analysis performed on CityGML data converted to i3s

It may be that you want to share your data with someone that does not have ArcGIS Pro. ArcGIS Earth can view SLPKs, if they are produced with a specific projection. Specifically, they must be in either the Web Mercator or WGS84 coordinate reference systems, using Decimal Degrees (DD) as their units. Much like in ArcGIS Pro, you can simply drag and drop the SLPK into the view for it to display. Note that ArcGIS Earth is built on top of the ArcGIS Runtime SDK for .NET, so it is possible to develop custom native applications with ArcGIS Runtime SDKs that are capable of consuming CityGML based SLPKs. 

CityGML converted to I3S displayed in ArcGIS Earth

You can also upload the SLPK to ArcGIS Online or Enterprise and publish a Scene Service. This can then be consumed in a web application built on top of the JavaScript API, or directly in the Web Scene Viewer. These services can also be consumed across the rest of the platform, including ArcGIS Pro, ArcGIS Earth, and in native run time applications. 

Converted CityGML data shared as a scene service.

Each building converted from the source CityGML file carries with it the attribution it contained in the original CityGML file, and can be accessed directly as a Scene Layer Package (SLPK) or as a feature from a Scene Service. 

Looking beyond the current tool. 

We are constantly striving to expand ArcGIS as an open platform that enables the use of open data.  We are planning to add more CityGML conversion capabilities to allow users to access as much of their archived open content as possibleOur planned next step will be to add support for multi-LOD cache generation for 3D buildings. After that, we will explore extracting additional CityGML data types for use in GIS, such as vegetation, street furniture, land use, and terrain. Please give the tool a try and let us know what you think. 

About the author

Eric Wittner is a Senior Product Manager focused on Procedural Technology and Smart Cities at Esri. He works to expand public understanding of how Esri's 3D products can enhance an organizations products and process, and help bring them success. He is focused on delivering domain specific tools to support urban planning and design. Having spent six years as part of the 3D software development team, he has an intimate understanding of Esri’s 3D technology. From his time as the product engineering lead for geodesign he understands how Esri's tools can be used to support interdisciplinary decision making in a variety of fields. As a thought leader at Esri, he helps shapes the vision and direction of Esri's software, data models, and solutions development through interaction with customers and the translation of their requirements into useful technology.

Connect:

Leave a Reply

Please Login to comment

Next Article

App Config using MDM for ArcGIS Business Analyst Mobile App

Read this article