BIM to GIS (Intermediate) | IFC LOD 300 to LOD 4 CityGML

Liz Sanderson
Liz Sanderson

FME Version

Introduction

Both IFC and CityGML have a hierarchical data structure. However, IFC’s structure is more complex, and contains intermediate features not required in CityGML. For example, in IFC Doors are the children of Openings, which in turn are the children of Walls, while in CityGML, Doors are children of Walls.

As well, the features are grouped somewhat differently. For example, parts of windows and stairs are contained in the IFC Member feature and must be added to their parent feature when converting to CityGML.

This example shows how to convert from a high detail IFC model to a CityGML with a Level of Detail (LOD) of four. This workspace is comprehensive enough to handle most Architectural IFC datasets.

 

Downloads

Step-by-step Instructions

Due to the sheer complexity of this workspace, this tutorial is a high-level overview. For parameter specifics, please open the workspace. Key parameters are mentioned.

 

Source Data

This workspace uses the DC Riverside Building LOD 300 IFC file, before beginning please download the data, which is from the Vectorworks website.

sourcedata.png

DC_Riverside_Bldg_LOD_300.ifc viewed in Solibri Model Viewer

 

Part 1: Create parent/child lookup

IFC features hold links to their parent features, but to remove unneeded intermediate features (like Openings) we also need links to the grandparent features. To do this we use two separate Industry Foundation Class STEP (IFC) readers. This first reader reads all the IFC features and populates a lookup table of feature and parent IDs as variables, and also a lookup table of parent types. Because this first reader does not use the IFC geometry, it runs quickly. FME runs its readers sequentially so that this reader will finish, and the lookup tables will be completely populated before the second reader starts.

parentlookup.png

Create a parent/child lookup table

 

Part 2: Create building

The second IFC reader is used for the data conversion. The Building is a simple conversion to remove any geometry using the GeometryRemover transformer and then and AttributeRenamer transformer to set the ifc_unique_id to the gml_id.

simplebuildingworkflow.png

A simple conversion to remove geometry from the building

 

Part 3: Convert complex IFC solid geometry to MultiSurface

All of the conversions will need to convert the geometry from a complex IFC solid to MultiSurface that can be written to CityGML, so a custom transformer called ConvertGeometry is created to quickly duplicate this process.

convertgeometrytransformer.png

Within the ConvertGeometry custom transformer, the IFC solid geometry is separated from the property sets with a GeometryPartExtractor transformer, then converted to surfaces with a GeometryCoercer transformer. Then to flatten multi-level geometry, it was disaggregated using the Deaggregator transformer and setting the Mode to Flatten All. Then the geometry is re-aggregate into MultiSurfaces using the Aggregator tranformer with the Mode set to Geometry - Assemble One Level and a GeometryRefiner transformer.

convertgeometry.png

ConvertGeometry custom transformer workflow

 

Part 4: Get grandparent ID

Almost all features have their parent link set to the IFC Building Story, instead of the Building, so we need to move up one link to create the CityGML parent link to the Building, using the lookup tables stored in the variables. Since this will be repeated throughout the workspace, another custom transformer called GetGrandParentID is created.

getgranparenttransformer.png

A BinaryEncoder transformer is used with a User Parameter created for Attribute to Encode. Then a VariableRetriever tranformer is added to set the _gparent_id. Finally, the _gparent_id is decoded, and another User Parameter is created for Destination Attribute using the BinaryDecoder transformer.

getgrandparentid.png

GetGrandParentID custom transformer workflow

 

Part 5: Set CityGML LOD Name and Feature Role

Before writing out to CityGML, a couple of attributes always need to be set following a strict naming convention. A CityGMLGeometrySetter custom transformer has been created to prevent data entry errors and can be found on the FME Hub. This transformer sets the CityGML Lod Name and the Feature Role.

 

Part 6: Simple conversions

Simple conversions require minimal filtering if any at all before writing out to CityGML. The main workflow goes as follows:

  1. Read in IFC data
  2. ConvertGeometry
  3. Set the gml_id
  4. GetGrandparentID
  5. CityGMLGeometrySetter
  6. Write out to CityGML

ifcspaceworkflow.png

Example simple conversion, converting IfcSpace to a CityGML Room

 

Part 7: Complex conversions

CityGML BuildingInstallation and WallSurface features are made up of many IFC feature types, and some IFC features may be part of both. IFC Members, StairFlights, Slabs, and Railings are combined into Stairs, which are then written as BuildingInstallations, along with Columns and Beams. Other Members are combined into CurtainWalls, which are written out to WallsSurfaces, as are IFC features Wall and WallStandardCase.

 

These separations and combinations can require several lookups of parent type and grandparent IDs from the variables created by the first IFC reader.

 

Part 8: Results

outputdata.png

Output CityGML file viewed in FZK Viewer

 

Data Attribution

Riverside Building demo project data produced by Nemetschek Vectorworks.

Was this article helpful?

Comments

1 comment

  • Comment author
    kyp4810 kyp4810

    hello.

    I know that CityGML has versions 1.0 to 3.0. Is the current article based on version 1.0 of CityGML?

    0

Please sign in to leave a comment.