Skip to main content
Question

How to extract a center point of a building in CityGML?

  • July 15, 2021
  • 1 reply
  • 32 views

christianlendl
Participant
Forum|alt.badge.img

Dear FME Community,

 

is there a way to extract a center point of a building in CityGML? So far I have only done it with the centerpoints of ground sufaces. But what if a complex building has multiple ground surfaces? Is there a way to treat the geometry of a building as one group? So instead of extracting the center point of one surface, extract it from the whole volume of a building. Do CityGML buildings have an individual id?

 

I have attached a sample CityGML file.

 

Thank you so much for your help!

With kind regards

 

Christian

1 reply

virtualcitymatt
Celebrity
Forum|alt.badge.img+43

CityGML has a complex structure for sure and is annoyingly flexible which means a building can have no geometryand still be valid.... And indeed getting the Centerpoint which seems trivial can be quite complex.

The best option I think here is to aggregate the buildings using the hierarchy option. The Aggregator transformer lets you choose ids and parent ids on which to structure a geometry hierarchy. Here you can use gml_id and parent_gml_id.

If you ignore the CityModel feature type and feed in everything to the aggregator you should get out one aggregate for each building.

This method is nice because you don't need to worry about missing or multiple ground surfaces or LOD's etc.​

After this you can pretty easily ​extract the bounds and create a 3D bounding volume or calculate the center point based on bounds.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings