CityGML is an open conceptual data model for the storage and exchange of virtual 3D city models. It is defined through a Unified Modeling Language (UML) object model. This UML model extends the ISO Technical Committee 211 (TC211) conceptual model standards for spatial and temporal data. Building on the ISO foundation assures that the man-made features described in the City Models share the same spatial-temporal universe as the surrounding countryside within which they reside. The aim of the development of CityGML is to reach a common definition of the basic entities, attributes, and relations of a 3D city model. This is especially important with respect to the cost-effective sustainable maintenance of 3D city models, allowing the reuse of the same data in different application fields.1
In order to describe a city model, CityGML utilizes thematic modules. The base module is the CityGML Core which gets extended by defined thematic modules such as Building, Bridge, Vegetation, Transportation, WaterBody, Relief, LandUse, Appearance etc. In this tutorial, the building module will be used to explain the CityGML concepts. Examples will be given in CityGML 2.0 as most existing tools are using this version. However, the examples will be given in CityGML 3.0 XML encoding as well to see the differences of CityGML 2.0 and CityGML 3.0.
The following example shows a CityModel (CityGML 2.0) that makes use of several modules including Building, Bridge, WaterBody, Vegetation, Relief, and Transportation.CityGML Model Stuttgart-Stöckach
CityGML Core
The following UML diagram defines the CityGML top level class hierarchy (based on CityGML 2.0 standard document, fig. 23, p51).
A CityModel is a collection of cityObjectMembers. Each CityGML module defines specific CityObjects such as Building objects, Vegetation objects etc. Every CityObject has a fixed set of specific attributes as specified in the UML model, and an Appearance to define its visual properties. GenericAttributes can be used to define additional attributes that are not explicitly specified in the UML model itself.
The XML encoding of the UML diagram is defined in an XML schema. In CityGML 2.0, the XML schema is a part of the CityGML standard document. An example of a typical XML document of a City Model is sketched here:
<?xml version="1.0" encoding="UTF-8"?>
<core:CityModel xmlns = … >
<core:cityObjectMember>
<bldg:Building> … </bldg:Building>
<bldg:Building> … </bldg:Building>
<bldg:Building> … </bldg:Building>
<!-- Terrain -->
<dem:ReliefFeature> … </dem:ReliefFeature>
<!– Lake -->
<wtr:WaterBody> … </wtr:WaterBody>
…
</core:cityObjectMember>
</core:CityModel>
In CityGML 3.0, only the UML model is defined in the conceptual model standard document. Unlike CityGML 2.0 multiple encodings can exist for CityGML 3.0 to encode the conceptual (UML) model. One encoding is the XML encoding. A free Java tool to convert datasets from CityGML 2.0 to CityGML 3.0 is available here. Other encodings such as CityDotNet, CityJSON, CitySQL are under development.
Both CityGML 2.0 and CityGML 3.0 (XML encoding) are XML based file format hence they can be easily viewed in any XML editor such as Notepad ++ and also using a free 3D GIS / BIM viewer - FZK Viewer. For am extensive list of other tools supporting CityGML, visit here.
Currently FZK viewer completely supports CityGML 2.0 but only partially support CityGML 3.0 (Elements of CityGML 2.0 are supported but new elements of CityGML 3.0 are not supported). An update to FZK viewer which fully supports CityGML 3.0 is under development.
Next Chapter Chapter 2: Building
Previous Chapter Home Page
References
CityGML Version 2.0
OGC City Geography Markup Language (CityGML) Encoding Standard, OGC document 12-019
CityGML Version 3.0
OGC City Geography Markup Language (CityGML) Part 1: Conceptual Model Standard, OGC document 20-010