Solved

Add CityGML Attributes


Hello All,

 

I'm working on a workbench to convert IFC to CityGML. Before writing out CityGML, I'm trying to add some CityGML attributes, e.g. class, function, usage, etc.. According the section "Setting CityGML attributes and properties in FME" from Writing CityGML from FME (safe.com), I used these two transfermors "AttributeCreator" and "GeometryPropertySetter" to add the attributes.

image 01However, the output CityGML cannot identify the attributes as the ones in CityGML schema. Foe example, I opened the CityGML with notepad, the attributes are look like this:

image 02Only "class" can be showed as "<bldg:class>", others are showed as "<gen:stringAttribute name="citygml_...">".

What I want is this:

image 03May I know is this possible to do in FME Workbench? If so, how? Many thanks.

PS. This is my version of FME Desktop.

image 04 

Regards,

Qubbie

icon

Best answer by virtualcitymatt 11 April 2023, 10:43

View original

2 replies

Userlevel 4
Badge +26

Yes this is doable,

 

You're pretty close, however, the naming of the attributes is important here. I've attached a screen shot here so you can see the full list for the 'Building' feature type. Note that some (like function and usage) need to be list attributes as a Building can have multiple functions. In the case where the attribute name does not match one in the list here it will be added as a generic attribute. You can try and delete the old writer and add a new writer using default settings and it should just add what I've put in the screen shot. You can use an AttirbuteManager to rename existent attribute to the new needed attribute values.image 

 

Yes this is doable,

 

You're pretty close, however, the naming of the attributes is important here. I've attached a screen shot here so you can see the full list for the 'Building' feature type. Note that some (like function and usage) need to be list attributes as a Building can have multiple functions. In the case where the attribute name does not match one in the list here it will be added as a generic attribute. You can try and delete the old writer and add a new writer using default settings and it should just add what I've put in the screen shot. You can use an AttirbuteManager to rename existent attribute to the new needed attribute values.image 

 

Thanks a lot! It works.

 

Besides, I would like to share my finding which can also do the same.

I follow the instruction of this website "https://community.safe.com/s/article/creating-a-textured-citygml-model" and try to "Replace the Adobe PDF Writer". When going to "Import Write Feature Types", I found it can add all CityGML attributes for each CityGML feature type. Turn on the circled optionsThen I just need to copy the User Attributes of the feature type I want to my own workspace.

All CityGML Feature TypesHope it helps someone who needs.

Reply