Question

How to write CityGML building UUID geometry hierarchy


Hello FME community!

Please lend me a hand in solving this. I've tried to explain (in pictures) best I can what I want to achieve. Have not been able to find any information or example of how to write CityGML files like this in FME.

These pictures describe 1 building. First picture is the surface_geometry table (I know, building geometry should reference their geometry using xlink_href but haven't gotten that far yet) This data is read from a CityGML database. The second picture describes how the CityGML files looks when exported from the database exporter. I want to build the same CityGML file within FME and later use FME to upload CityGML into the database.

If I aggregate the geometry before I write, I loose the UUID and thehierarchy. If I don't, what should be 1 building is 22 buildings. Both the root and the composite doesn't have any geometry. Any help would be greatly appreciated, I've been struggling with this thing for some time.


2 replies

Can you post a screenshot of the Aggregator parameters? I'm guessing you'll want to have Mode = Assemble Hierarchy at the very least. Probably also convert attributes to traits (traits are like attributes but I think can be connected to individual parts of a multiple geometry, in a way attributes can't).

Thank you @mark2catsafe for your help, much appreciated! :)

I managed to get the hierarchy structure going by tweeking the aggregator parameters like you suggested. But it's still quite different from the screenshot I showed above. I have played around with the traits but can't figure out how to define a "CompositeSurface" (picture above id(20)) instead of "Building" (picture below). Because of that 1 building has turned in to 23. I have attached the workspace if it makes things easier.citygml-geometryhierarchy.fmwt

Reply