Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading CityGML fails if file has a <cityObjectMember> only containing ignored elements #92

Open
mlavik1 opened this issue Mar 21, 2024 · 0 comments

Comments

@mlavik1
Copy link
Contributor

mlavik1 commented Mar 21, 2024

When parsing a node we always create a new CityObjectElementParser.

This causes an exception to be thrown in CityGMLElementParser::endElement (see citygmlelementparser.cpp) if the only contains children that are ignored (because they haven't been implemented, etc.).

I've created a test file (modified version FZK-Haus) that shows the problem:
ignore-test.zip

This is the model where I first encountered this problem (because it uses "grp:CityObjectGroup", which is not implemented):
LoD3_Railway.city.zip
I've encountered the same issue on other models too.

I suggest replacing that error with a warning, and instead handling this case. I can create a PR for that. Though, please correct me if you think that would be a bad idea 😅

In the case of a container element containing a child element with an xlink, it should also be safe to continue parsing - but it's fair to print a warning, since that element won't be parsed. I noticed once case where that happens (tran:intersection with an xlink - which isn't handled at the moment). I might make a bug/PR for that too.

And by the way, thanks a lot for making this amazing library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant