span8
span4
span8
span4
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.
IFC-LOD4City.fmw (Completed workspace without data)
Download Data(Data can be downloaded from Vectorworks)
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.
This workspace uses the DC Riverside Building LOD 300 IFC file,before beginning please visit theVectorworks websiteand download the DCR-LOD_300.zip file which can be found under Part 3: LOD-300.
DC_Riverside_Bldg_LOD_300.ifc viewed inSolibri Model Viewer
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 separateIndustry 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.
Create a parent/child lookup table
The second IFC reader is used for the data conversion.The Building is a simple conversion to remove any geometry using theGeometryRemovertransformer and then andAttributeRenamertransformer to set the ifc_unique_id to the gml_id.
A simple conversion to remove geometry from the building
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.
Within the ConvertGeometry custom transformer,the IFC solid geometry is separated from the property sets with aGeometryPartExtractortransformer,then converted to surfaces with aGeometryCoercertransformer.Then to flatten multi-level geometry,it was disaggregated using theDeaggregatortransformer and setting the Mode to Flatten All.Then the geometry is re-aggregate into MultiSurfaces using theAggregatortranformer with the Mode set to Geometry - Assemble One Level and aGeometryRefinertransformer.
ConvertGeometry custom transformer 亚搏在线workflow
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.
ABinaryEncodertransformer is used with a User Parameter created for Attribute to Encode.Then aVariableRetrievertranformer is added to set the _gparent_id.Finally,the _gparent_id is decoded,and another User Parameter is created for Destination Attribute using theBinaryDecodertransformer.
GetGrandParentID custom transformer 亚搏在线workflow
Before writing out toCityGML,a couple of attributes always need to be set following a strict naming convention.ACityGMLGeometrySettercustom 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.
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
Example simple conversion,converting IfcSpace to a CityGML Room
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.
Output CityGML file viewed inFZK Viewer
Data Attribution
Riverside Building demo project data produced byNemetschek Vectorworks.
© 2019 亚搏在线Safe Software Inc |Legal