Skip to content

Commit

Permalink
[Fixes #246] Fix transform for 3dtiles handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed Jun 21, 2024
1 parent 959834c commit 103342e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions importer/handlers/tiles3d/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ def set_bbox_from_region(self, js_file, resource):
return resource

def set_bbox_from_boundingVolume(self, js_file, resource):
transform_raw = (
js_file.get("root", {}).get("boundingVolume", {}).get("transform", None)
)
transform_raw = js_file.get("root", {}).get("transform", [])
box_raw = js_file.get("root", {}).get("boundingVolume", {}).get("box", None)
if not transform_raw and not box_raw:
# skipping if values are missing from the json file
Expand Down
6 changes: 3 additions & 3 deletions importer/handlers/tiles3d/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ def test_set_bbox_from_bounding_volume_wit_transform(self):
"asset": {"version": "1.1"},
"geometricError": 1.0,
"root": {
"boundingVolume": {
"transform": [
"transform": [
96.86356343768793,
24.848542777253734,
0,
Expand All @@ -280,7 +279,8 @@ def test_set_bbox_from_bounding_volume_wit_transform(self):
-4736682.902037748,
4081926.095098698,
1,
],
],
"boundingVolume": {
"box": [0, 0, 0, 7.0955, 0, 0, 0, 3.1405, 0, 0, 0, 5.0375],
}
},
Expand Down

0 comments on commit 103342e

Please sign in to comment.