Skip to main content
Solved

How can I extract CityGML feature type ids.


Forum|alt.badge.img

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!

Best answer by davideagle

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.

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

davideagle
Contributor
Forum|alt.badge.img+21
  • Contributor
  • Best Answer
  • January 15, 2016

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.


Forum|alt.badge.img
  • Author
  • January 15, 2016
davideagle wrote:

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.


davideagle
Contributor
Forum|alt.badge.img+21
  • Contributor
  • January 15, 2016
anete wrote:

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

Glad you're sorted....


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