Closed felix-mu closed 5 months ago
@felix-mu thanks for the bug report!
I'll try to fix it, but I might need your help :o
Here's a pull request: https://github.com/njam/citygml-to-3dtiles/pull/47 Could you take a look? Do you think it solves the problem?
@njam thank you very much for taking action so quickly! I tested the new version with the sample data from above and it seems to be working right now. Also I took a look at your changes in the code and as far as I can judge it should be fine like you changed it. Thank you very much!
@felix-mu thanks for the feedback!
I've published a bugfix version 0.1.6
to NPM.
Hi, first of all thank you for your great work! While using your library I found that the computation of the Tileset-Region or rather the bounding box is done in cartesian coordinates resulting in an unexpected result when converting it back to cartogrpahic coordinates.
The bounding box is the reason for not being able to pick features to view their attributes like stated here: https://github.com/CesiumGS/cesium/issues/10367#issuecomment-1126047465
During my investigation I found out that the determination of the min/max points of the points of the bounding boxes in https://github.com/njam/citygml-to-3dtiles/blob/11c45eed69f1422c815160e1f4dff6efe112e2d6/src/geometry/BoundingBox.mjs#L38 uses cartesian coordinates and therefore it might be the case that the bounding box does not correspond to the original bounding box in the projected SRS any more.
My current quick and dirty workaround is to subclass your bounding box class and override the fromPoints function to use cartographic coordinates and afterwards transform the bbox to cartesian coordinates:
This results in an correct bounding box and selectable features: