span8
span4
span8
span4
This example demonstrates an advanced translation of a more complex LOD 200 IFC model to a LOD3 CityGML document. The output contains both LOD2 and LOD3 representations of the Riverside Building.
IFC-LOD3City.fmw(Completed workspace without data)
Download LOD_100 Data(数据可以从VectorWorks下载)
Download LOD_200 Data(数据可以从VectorWorks下载)
1) Download data
This exercise will be using the DC Riverside Building LOD 100 IFC file as well as the DC Riverside Building ARCH 200 IFC file. Before beginning please下载LOD_100数据andLOD_200数据来自Vectorworks website。
2) Read source
In this example, the Revit reader is used to read the LOD 200 IFC data. The advantage of this approach is that it provides the “building elements with hierarchy” reader option which assembles and exposes the properties of the building elements. The geometries extracted by the REVIT reader can then more easily be written to a GIS like representation such as a CityGML document.
添加A.nAutodesk Revit读取器到空白工作区并浏览到DC_RIVESIDE_BLDG-ARCH-LOD_200.IFC数据集。在参数中,确保Revit Data View设置为构建具有层次结构的元素。
AutoDesk Revit Reader parameters
For Feature Types to read select BuildingColumnStair, BuildingElementProxy, Door, Member, Opening, Slab, StairFlight, Wall, and Window. You should have nine feature types on the canvas.
3) Group by CityGML feature types
必须知道IFC模型的哪个构建元素或层数由CityGML文档的特定特征类型表示。有时,CityGML功能类型与多个构建元素对应。在这种情况下,它们由公共ID合并,因此它们可以将它们路由到同一特征类型。由于IFC数据的元素ID无效GML ID,因此为每个功能创建新的GML ID。此外,每个功能都会获得一个属性,其中它可以与其父级的GML ID连接,稍后是构建功能类型。
添加A.nAttributeCreatortransformer to the canvas and connect it to both the StairFlight and BuildingElementProxy. In the parameters, append _BldgInstallations to the Transformer Name. Then create a new attribute called feature_type and give it the value of BuildingInstallation. Create a second attribute called parent_name and give it the value of dc_riverside_building. Finally, create a third attribute called _uuid and give it the value of gml_@UUID()
使用attributecreator创建三个新属性
Duplicate the AttributeCreator and connect it to both BuildingColumn and Member. In the parameters append _BldgParts to the Transformer Name and change the value of feature_type to BuildingPart.
Duplicate the AttributeCreator three more times and set them up as follows:
Connect to Feature Type | 将变压器的名字 | feature_type Value | |
AttributeCreator_3 | 墙壁 | _Walls | Wall |
AttributeCreator_4 | Slab | _FloorRoof | Floor_Roof |
AttributeCreator_5 | Window and Door | _Openings | Windows_Doors |
这Opening Feature Type will remain unconnected for now.
AttributeCreator parameters and connections for each Feature Type
4) Scale and create a coordinate system
这model is currently in millimetres and will need to be scaled to meters. Add aScalertransformer to the canvas and connect it to all of the AttributeCreators. In the parameters set X, Y, and Z to 0.001.
IFC中没有存储在IFC中的坐标系信息。这localcoordateystemsetter.transformer still allows us to tag all features with an auto-generated local reference system (AZMEA). Add a LocalCoordinateSystemSetter to the canvas and connect it to the Scaler. In the parameters, set the following:
Origin Coordinate System | LL84 |
Origin X | -76.986560155564575 |
Origin Y | 38.876070469421258 |
localcoordinatesystemsetter参数原点x和y
Finally, the coordinate system to will need to be changed. Add acsmapreprojectortransformer to the canvas and connect it to the LocalCoordinateSystemSetter. In the parameters set the Destination Coordinate System to EPSG:2248 and set the Vertical Handling to Heights are relative to the ellipsoid(s) or geocentric.
5)创建构建功能类型
这hierarchy of an IFC model is often more complex than the hierarchy of the CityGML document. In this example, the CityGML model is assembled in a simplified way that all building elements are children of the building feature type, except for the openings.
添加A.nIndustry Foundation Class STEP Files (IFC)Reader to the canvas and browse to the DC_Riverside_Bldg-LOD_100.ifc dataset. In the parameters change the Read IfcSpace Geometries to Yes. In the Select Feature Types dialog select only IfcSpace and IfcSlab.
IFC Reader parameters; change Read IfcSpace Geometries to Yes
Next, a single mesh will need to be created. Add aTriangulatortransformer to the canvas and connect it to both IfcSpace and IfcSlab. In the parameters, ensure that Aggregate Handling is set to Deaggregate. Then add aMeshMergertransformer to the canvas and connect it to the TINSurface output port on the Triangulator.
Connect the Triangulator to IfcSlab and IfcSpace, the the MeshMerger to the TINSurface output port
6) Create CityGML Attributes.
无需创建每个单个CityGML功能类型。可以从CityGML_Feature_types.xml文件导入所有功能类型模式,该文件可以在安全FME安装的XML文件夹中找到。亚搏在线要创建CityGML文档,可以为每个功能设置有效的几何,功能角色以及详细信息非常重要。几何角色必须设置为几何形状的特征。CityGML Writer使用该特性来为该功能创建正确和有效的几何体。特征角色和细节级别被设置为属性。
添加A.CityGMLGeometrySetter变压器到画布上并将其连接到我shMerger. This is a custom transformer that creates the CityGML Feature Role and Level of Detail attributes, which follow a strict naming convention. Using the transformer prevents case sensitive typos. In the parameters, set the CityGML Lod Name to lod2Solid and then set the Feature Role to cityObjectMember.
Next, add an AttributeCreator to the canvas and connect it to the CityGMLGeometrySetter. In the parameters, create the following attributes:
Attribute Name | Attribute Value |
citygml_level_of_detail | 2 |
gml_id | gml_@UUID() |
gml_name | dc_riverside_building. |
7) Write building out to CityGML
你好ghlight and duplicate the Scaler, LocalCoordinateSystemSetter and the CsmapReprojector transformers. Connect the Scaler_2 to the AttributeCreator connected to the IfcSpace and IfcSlab workflow.
添加A.CityGML写入画布并浏览到一个文件夹以保存,命名文件riverside_lod3.gml。默认参数可以确定,但将要素类型定义设置为自动。接下来,在“功能类型”窗口中,将要素类型名称更改为构建。将其连接到CSMapreProjector_2。
亚搏在线工作流程在CityGML中创建建筑物
8) Join with parent gml_id
Next, join the building elements with the building, add aFeatureMerger把变压器放到画布上。将CsmapReprojector从Building Elements工作流连接到Requestor输入端口,然后将AttributeCreato亚搏在线r从IfcSpace和IfcSlab工作流连接到Supplier输入端口。
将Revit Re亚搏在线ader和IFC阅读器的工作流程加入Featuremerger
In the parameters, set the Join On Requestor to parent_name and then the Supplier to gml_name. Set the Attribute Accumulation Mode to Prefix Supplier and add the Prefix suppl_.
FeatureMerger parameters; Join on parent_name and gml_name, and set the Prefix to suppl_
9)保持和创建属性
这re are a bunch of attributes that were read in that are not needed. Add anAttributeKeeper变压器到画布上并将其连接到我rged output port on the FeatureMerger, then select only the following attributes to keep:
属性单位参数
添加A.n AttributeCreator to the canvas and connect it to the AttributeKeeper. In the parameters set the following:
Attribute Name | Attribute Value |
citygml_level_of_detail | 3 |
gml_id | _uuid |
gml_parent_id | suppl_gml_id |
10) Filter attributes
Now that all the features have received the appropriate CityGML attributes, they need to be styled according to their type. Separate out the Feature Types using theAttributeFilter变压器。将AttributeFilter变压器添加到画布并将其连接到属性簿。在参数中,将属性设置为feature_type过滤。然后出于可能的属性值,请参阅以下内容:
AttributeFilter parameters to separate out parts
11) Building Installations and Building Parts
构建装置和构建部件的规范取决于其所选几何和特征角色不同。知道哪些角色对于某些特征类型有效,这是至关重要的,以编写有效的CityGML文档。建筑安装是CityGML中最不限制的几何角色之一的示例。任意GML几何形状可以表示Lod3Geometry,而建筑物部分仅限于Lod3solid,Lod3Multisurface,Lod3Multicurve和Lod3terrainCectersection。对于CityGML翻译的IFC,Lod3Mulitsurface可能是最安全的选择,因为如果使用LoD3Solid,某些功能可能不亚搏在线会构建有效的实体几何。
添加A.CityGMLGeometrySetter to the canvas and connect it to the BuildingInstallation output port on the AttributeFilter. In the parameters set the CityGML Lod Name to lod3Geometry and set the Feature Role to outerBuildingInstallation.
Next, add anApperanceSettertransformer to the canvas and connect its Geometry Input port to the CityGMLGeometrySetter_2. In the parameters, expand Color Parameters and set the Appearance Name to Installation, set the Diffuse color to 0.317647,0.317647,0.317647 and then set the Alpha to 1.
AppearanceSetter parameters, set the Appearance Name, Diffuse Color and Alpha.
添加写入器功能类型并将其名称构建安装,将其连接到展示而上的输出端口。
Duplicate the CityGMLGeometrySetter, AppeareanceSetter and Writer Feature Type. Connect the duplicates to the Building Part output port on the AttributeFilter.
In the CityGMLGeometrySetter_3 change the CityGML Lod Name to lod3MultiSurface and the Feature Role to consistsOfBuildingPart. In the AppearanceSetter_2 change the Appearance Name to Part and the Diffuse Color to black. Finally, rename the Writer Feature Type to BuildingPart.
BuildingPart and Building Installation workflow
12) Roof, Walls, and Floors
添加A.nother CityGMLGeometrySetter to the canvas; this time connect it to the Floor_Roof, and Wall output ports on the AttributeFilter. In the parameters, set the CityGML Lod Name to lod3MultiSurface and the Feature Role to boundedBy.
Next split the features into their parts, add aTestFiltertransformer to the canvas. In the parameters set the first IF test condition to Name Contains ROOF OR Pset_SlabCommon.IsExternal = Yes then set the Output Port to Roof
Set the Else If to Name Contains Wall and the Output Port to Wall
Set the Else Output Port to Floor
TestFilter parameters to create the output ports Roof, Wall and Floor
Next, add an AppearanceSetter and connect the Geometry input port to the Roof output port on the TestFilter. In the parameters set the Appearance Name to Roof, the Diffuse Color to Red and the Alpha to 1. Add another Writer Feature Type and name it RoofSurface and connect it to the Output port on the AppearenceSetter.
Duplicate the AppearenceSetter and the Writer Feature Type and connect it to the Wall output port on the TestFilter. In the AppearanceSetter parameters change the Appearance Name to Wall and the color to a light yellow. Rename the Writer Feature Type to WallSurface.
再次复制播写器和写入器功能类型并将其连接到楼层输出端口。在似乎的参数中,将外观名称更改为地板和颜色到棕色。将写入器功能类型重命名为陷阱。
Workflow for Roof, Wall and Floor CityGML features
13) Preserve hierarchy
这opening layer of the IFC model can supply every door and window with an element ID of the wall it belongs to. To transform this two-levelled hierarchy to the hierarchy we need in CityGML, two joins are required.
第一个连接正在加入与墙面之前添加的开口特征类型。将FeatureMerger添加到画布上,并将墙壁输出端口从AttributeFilter连接到供应商输入端口。然后将打开功能类型连接到请求者输入端口。将请求者的连接设置为Element_Parent_ID和Outhite_ID。然后将属性累积模式设置为前缀供应商并添加前缀_WALL_。
添加A.nother FeatureMerger to the canvas and connect the Windows_Doors output port on the AttributeFilter to the Requestor input port then connect the Merged output port of the previous FeatureMerger to the Supplier input port. Set the Join On Requestor to element_parent_id and the Supplier to element_id. Then set the Attribute Accumulation Mode to Prefix Supplier and add the Prefix suppl_.
Preserve hierarchy workflow for Openings
14) Windows and Doors
创建窗口和门功能的最后一步是设置CityGML属性并应用外观。添加attributecreator并将其连接到合并的输出端口。在参数中设置以下内容:
Attribute Name | Attribute Value |
citygml_lod_name | lod3MultiSurface |
citygml_level_of_detail | 3 |
citygml_feature_role | opening |
gml_id | _uuid |
gml_parent_id | suppl_suppl_wall_uuid |
然后将GeometryPropertySetter连接到AttributeCreator。在参数中,将源属性设置为citygml\u lod\u name。
Separate out of the windows and doors, do this by adding aTestertransformer to the workspace and connect it to the Set output port on the GeometryPropertySetter. Set the test to Name = Window.
添加一个AppearanceSetter to the canvas and connect it to the Passed output port on the Tester, this will set the appearance for the windows. In the parameters, set the Appearance Name to Window and set the Diffuse Color to a light blue. To achieve a transparent glass-like effect for the window’s appearance set the Alpha to 0.2 and the Shininess to 1.
添加A.nother Writer Feature Type and name it Window and connect it to the Output port on the AppearenceSetter.
添加A.nother AppearanceSetter and connect it to the Failed output port on the Tester, this will set the appearance for the doors. In the parameters, set the Appearance Name to Door, the Diffuse color to light brown and Alpha to 1.
添加A.nother Writer Feature Type and name it Door and connect it to the Output port on the AppearanceSetter.
整个完成的工作区
15) Inspect and Validate the CityGML document
在运行工作区之前,请确保已拒绝的功能处理设置为继续翻译然后运行工作区。
Output CityGML file viewed in the FME Data Inspector
Opening the resulting CityGML file in the Data Inspector allows the user to check for missing geometries or wrong appearances. TheXMLValidatortransformer can be used to validate a CityGML document. A Creator transformer connected to the XMLValidator starts the validation. In the XMLValidator parameters, the CityGML file is selected as the input, and the appropriate schema file is chosen for schema validation. For CityGML 1.0 use:
If you see errors or geometries dropped when writing to CityGML, you can also use theGeometryValidatortransformer to check for 2D and 3D geometry errors on your output before the features are written. There are even repair options, though these should be used with some caution and results verified since any repair always has a chance of introducing new errors.
数据归因
Riverside Building demo project data produced byNemetschek Vectorworks。
© 2019 Safe Software Inc |Legal