Converting CityGML to INSPIRE 3D Buildings (Annex III)

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2015.x


CityGML is converted to INSPIRE* Annex III Buildings² in this demonstration. Building models are often stored in CityGML,and this format has strongly influenced the model for INSPIRE 3D Buildings.

INSPIRE 3D Buildings GML has a number of differences compared to CityGML. CityGML consists of feature types, such as windows and doors, not required by the INSPIRE Buildings specifications. INSPIRE GML includes attributes to support INSPIRE’s mandate, many of which are common to other INSPIRE themes. Additionally, INSPIRE specifications state that, unlike CityGML, parts cannot have subparts, and appearances are simplified.

The demo workspace reads CityGML, then INSPIRE required attributes are created and populated. Geometry is simplified and aggregated to match the INSPIRE specifications. Finally, INSPIRE BuildingPart GML is written; the Buildings’ feature type, BuildingPart, is described as a subdivision of a building (ground, wall and roof surfaces). As well, the building model level of detail (LoD) 2 is used. In LoD 2, a BuildingPart is represented in a generalized manner.

Step-by-step Instructions

Transforming CityGML into INSPIRE GML

1. Read source CityGML feature types
CityGML Readers are used to read GroundSurface, WallSurface, and RoofSurface source feature types from a CityGML file.

2. Define INSPIRE attributes and perform schema mapping
INSPIRE required attributes are created and populated using an AttributeCreator transformer. The defined horizontalGeometryEstimatedAccuracy value is for demo purposes only. Schema mapping is performed using an AttributeCopier, mapping source gml_id to destination localId.

3. Reprojection
The data is reprojected to the ETRF89.Europe/Lambert Coordinate system.

4. Build INSPIRE geometry
The GeometryPropertyRemover transformer is used to simplify the geometry by removing all geometry traits. Then, geometries are grouped together based on gml_id into multiple geometries.

INSPIRE 3D BuildingPart GML is written using the INSPIRE GML Writer and BuildingsCore3D theme. The geometry is written to the geometry3DLoD2.BuildingGeometry3DLoD2.geometryMultiSurface attribute, one of the attributes with type xml_geometry.

Demo workspace converting CityGML to INSPIRE Buildings


Validation of INSPIRE 3D Buildings GML

The writer parameter in the Navigator window, Validate Output File, is set to Yes. When the workspace is run, in addition to writing INSPIRE GML, the GML is validated against syntax and the BuildingsCore3D schema (XSD). Once the GML validates, turning off validation can improve writing performance.

Validate Output File set to Yes in the Navigator window


Viewing INSPIRE GML in Data Inspector

To load the data more quickly when adding the dataset to the Data Inspector, use the Parameters button in the dialog to Select Feature Types:

  • by themes, deselect all the themes, or only select the BuildingsCore3D
  • by XSD, navigate to the BuildingsCore3D XSD

INSPIRE Buildings GML viewed with Data Inspector

Note: This example is for demonstration purposes only. The resulting data is not to be used for any operational purposes.

* INSPIRE is a European Union (EU) directive that requires member states and agencies to share spatial data in order to better support environmental decision making.

² For more on INSPIRE Buildings please, view the data specifications.


Was this article helpful?



Please sign in to leave a comment.