jklimke / libcitygml

C++ Library for CityGML Parsing and Visualization
GNU Lesser General Public License v2.1
97 stars 55 forks source link

dem:TINRelief: Use LOD=0 if dem:lod is not specified #88

Closed mlavik1 closed 2 months ago

mlavik1 commented 6 months ago

Hi! I'm not 100% sure if you want this PR, but I'll give it a try.

I've run into some gmls where dem:lod is missing from TINRelief, although I believe it's required? These models causes a crash in cityobjectelementparser.cpp.

At least I think it would be nice to avoid the crash, and instead throw a runtime error or something. But handling this (by setting LOD to 0 as I did in this PR) will make terrain from the Berlin 3D dataset work: https://www.businesslocationcenter.de/en/economic-atlas/download-portal

mlavik1 commented 6 months ago

export_terrain.zip Here's a GML where the problem can be reproduced (textures are missing, since they take too much space)