The Role of XML in the CityGML Standard
This article explores the foundational role of Extensible Markup Language (XML) within CityGML, an open standard for representing and exchanging 3D city and landscape models. It details how CityGML leverages XML and Geography Markup Language (GML) to structure semantic and geometric data, validate datasets through XML schemas, and enable interoperability across geospatial platforms.
The Foundation: CityGML as an XML-Based GML Application
CityGML is developed by the Open Geospatial Consortium (OGC) and is implemented as an application schema of the Geography Markup Language (GML), which is itself an XML-based grammar for geographic data. Because CityGML is built on GML, XML serves as the underlying syntax and data model for encoding 3D urban features. It provides the standardized markup used to describe everything from single buildings and vegetation to complex utility networks and terrain models.
Integration of Semantics, Geometry, and Topology
The primary strength of CityGML is its ability to combine spatial geometry with rich thematic (semantic) information. XML makes this possible through hierarchical element structures:
- Semantic Hierarchy: XML nesting allows city objects
to be broken down into components (e.g., a
bldg:Buildingcontainingbldg:WallSurfaceandbldg:RoofSurfaceelements) alongside thematic attributes such as construction year, building class, or ownership data. - Geometric Encoding: XML tags define 3D spatial representations using GML geometries (such as points, polygons, and solids) across different Levels of Detail (LOD 0 to LOD 4).
- Topological Relationships: Shared boundaries,
adjacencies, and parent-child relationships between spatial features are
explicitly mapped using XML references and identifiers (such as
gml:id).
Data Validation via XML Schema Definitions (XSD)
XML schemas (XSD files) define the strict structural and data type rules for CityGML modules. These schema files specify which elements are mandatory, which attributes are allowed, and how child elements must be arranged. As a result, software applications can automatically validate a CityGML document against the official XSD definitions before processing the data, guaranteeing that the spatial data transfer is error-free and compliant with OGC standards.
Extensibility Through Namespaces and ADEs
CityGML utilizes XML namespaces to prevent naming conflicts and support modularity. This XML feature allows CityGML to be extended for specialized use cases—such as solar potential analysis, noise mapping, or disaster management—through Application Domain Extensions (ADEs). Using ADEs, developers can define custom XML schemas that inherit base CityGML structures while introducing domain-specific classes and attributes.
Cross-Platform Interoperability
XML is a plain-text, vendor-neutral format. By relying on XML, CityGML ensures that 3D spatial data can be generated, transmitted, and consumed across diverse GIS, CAD, BIM, and simulation software ecosystems without relying on proprietary, platform-dependent binary formats.