citygml4j / citygml-tools

Collection of tools for processing CityGML files
Apache License 2.0
124 stars 19 forks source link

Unreasonably long time (possibly dead loop) to convert some gml files #8

Closed zhou13 closed 5 years ago

zhou13 commented 5 years ago

It takes unreasonably long time (possibly dead loop) to convert https://drive.google.com/file/d/1rP5P7W3dTiP9vK9VrxvWK5dqO5QIrvWw/view?usp=sharing. Normally citygml-tool will finish the conversion task in several minutes but for this file, it takes forever (48+ hours and it is still running)

clausnagel commented 5 years ago

Yes, you are right. The program ran into an infinite loop. I fixed citygml4j (https://github.com/citygml4j/citygml4j/commit/54f28afe3079b3a88a8f8da86a1c65e038534658) and updated the master branch. So you can build a new version following these instructions.

Please also check your dataset. It contains a lof of issues (such as schema violations, unclosed rings, invalid rings, invalid solids, invalid XLinks, invalid mix of CityGML 1.0 and 2.0).

Some polygons share the same gml:id which is not allowed (gml:ids must be unique per dataset). And then there are XLink references to these duplicate gml:ids. Such references cannot be resolved unambiguously and may lead to unexpected issues. This was one reason for the infinite loop. Well, it even seems that entire buildings are redundantly stored in the dataset?

clausnagel commented 5 years ago

Just published version 1.3.2 which contains the fix. So closing this issue.