Skip to main content

Hi folks,

I have a CityGML file with many buildings. These buildings have buildingParts with unique gml_ids. I need to access these buildingPart ids in an automatic way, so later I can use them as gml_parent_ids.

Can somebody please suggest me a way how to automatically extract gml_id from CityGML feature type. Please and thanks!

On the reader featuretype you can expose the gml_id and then use an AttributeCopier to copy the ID into an attribute with a name of your choosing. You can also use an AttributeExposer instead of exposing the attribute at source.

If there are many parts to each feature you may first need to use a Deaggregator to 'explode' each building into its component parts, though take care as you may have aggregates inside aggregates in which case you may need to 'flatten' more than one level.


On the reader featuretype you can expose the gml_id and then use an AttributeCopier to copy the ID into an attribute with a name of your choosing. You can also use an AttributeExposer instead of exposing the attribute at source.

If there are many parts to each feature you may first need to use a Deaggregator to 'explode' each building into its component parts, though take care as you may have aggregates inside aggregates in which case you may need to 'flatten' more than one level.

Wow, that was fast. Thanks much! AttributeExposer did the trick.


Wow, that was fast. Thanks much! AttributeExposer did the trick.

Glad you're sorted....


Reply