span8
span4
span8
span4
This tutorial demonstrates a basic IFC to CityGML translation with a low level of detail: IFC LOD100 to CityGML LOD2.
IFC-LOD2City.fmw (Completed workspace without data)
Download Data(Data can be downloaded from Vectorworks)
1) Download data
This exercise will be using the DC Riverside Building LOD 100 IFC file,before beginning please visit theVectorworks网站and download the DCR-LOD_100.zip file which can be found under Part 1: LOD-100.
2) Read source IFC
In a blank workspace add anIndustry Foundation Class STEP Files (IFC)reader to the canvas and browse to the DC_Riverside_Bldg-LOD_100.ifc dataset.We will want to read in the IfcSpaces geometry type,so in the reader parameters,set the Read IfcSpace Geometries to Yes.Click OK to add the Reader.
IFC Reader parameters;change Read IfcSpace Geometries to Yes
In the Select Feature Types dialog,only select IfcSlab and IfcSpaces.These are the two layers needed to create a simple lod2Solid geometry.The IfcSlab represents the floors and roofs,and the IfcSpace represents the space between these floors.
3) Create a single mesh
The IFC features need to be merged into a single feature that represents the building.Add aTriangulatortransformer to the canvas and connect it to both the IfcSlab and IfcSpace feature type.In the parameters,ensure that Aggregate Handling is set to Deaggregate.This transformer breaks the input geometry into a mesh for each of the flattened components.When we run this workspace later on,some of the features will be rejected,so to ensure that the workspace continues running we need to set the Rejected Feature Handling.Right-click on the
Now that the meshes have been created for each component we need to merge them together so we can work with a single mesh.Add aMeshMergertransformer to the canvas and connect it to the TINSurface output port on the Triangulator.This will merge the 59 individual meshes into a single mesh.
Create a single mesh using the Triangulator and MeshMerger
4) Set Attributes and traits
CityGML has specific standards for attribute naming in order for the file to be readable.Thankfully there is a custom transformer to create these attributes.Add aCityGMLGeometrySettercustom transformer to the canvas.In the parameters set the CityGML Lod Name to lod2Solid and the Feature Role to cityObjectMember.You could create these attributes using an AttributeCreator and a GeometryPropertySetter,but using this custom transformer prevents typos because these attribute values are case sensitive.
Set CityGML Lod Name to lod2Solid and Feature Role to cityObjectMember
We have other attributes we'd like to create that don't need to follow the strict standards.Add anAttributeCreatortransformer to the canvas and connect it to the CityGMLGeometrySetter.In the parameters set up the following attributes:
Attributes To Create | 属性值 |
citygml_level_of_detail | 2 |
gml_id | gml_@UUID() |
gml_name | dc_riverside_building |
Create citygml_level_of_detail,gml_id and gml_name attributes
5) Scale and set coordinates
There is no coordinate system information stored in the IFC model,but there is a KML file of the building available.If you would like to explore the KML model,you can download it from the VectorWorks website.
We will need to scale the model because it is currently in millimetres.Add aScalertransformer to the canvas and connect it to the AttributeCreator.In the parameters,set the Scale Factor for X,Y,and Z to 0.001 which will scale it to meters.
Next,add aLocalCoordinateSystemSettertransformer to the canvas,set the following:
Origin Coordinate System | LL84 |
Origin X | -76.986560155564575 |
Origin Y | 38.876070469421258 |
Set the Origin X and Y in the LocalCoordinateSystemSetter
Finally,reproject the data into the desired coordinate system.To do this,add aCsmapReprojectortransformer to the canvas.In the parameters,set the Destination Coordinate System to EPSG:2248 and then change the Vertical Handling to Heights are relative to the ellipsoid(s) or geocentric.
6) Write to CityGML
Add aCityGMLwriter to the canvas and name the dataset Riverside_LOD2City.gml.Set the Feature Type Definition to Automatic and then connect it to the CsmapReprojector.In the Feature Type parameters set the Feature Type Name to Building.
Run the workspace and inspect the output.Note,that if your workspace terminates at the Triangulator,ensure that Rejected Feature Handling was set to Continue in Step 3.
Completed workspace
Output CityGML viewed in the FME Data Inspector
Data Attribution
Riverside Building demo project data produced byNemetschek Vectorworks.
i have followed you tut but getting an error in Triangularor (Rejected) that Invalid Transformer.There are invalid paramenter values in either the main worksapce and /or embedded transformers.The invalid values are in: Main.
Hi@007fkj,
Thanks for catching that.I just worked through the workspace again and caught the issue.You will need to turn of Rejected Feature Handling.Right-click on the
Let me know if you are still having issues,
-Liz
© 2019 亚搏在线Safe Software Inc |Legal