Skip to content

Commit

Permalink
Update OBB calculation; Remove transform from tileset
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsdukai committed May 1, 2019
1 parent 328b505 commit 58a730a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cjio/cjio.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def processor(cm):
def update_crs_cmd(epsg):
"""
Reproject the CityJSON to a new EPSG.
The current file must have an EPSG defined (do it with function update_epsg()).
The current file must have an EPSG defined (do it with function assign_epsg).
"""
def processor(cm):
utils.print_cmd_status('Reproject to EPSG:%d' % epsg)
Expand Down
15 changes: 4 additions & 11 deletions cjio/tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ def compute_obb(bbox):
The last three elements (indices 9, 10, and 11) define the z-axis direction and half-length.
"""
obb = [
bbox[0], bbox[1], bbox[2],
bbox[3]/2, bbox[1], bbox[2],
bbox[0], bbox[4]/2, bbox[2],
bbox[0], bbox[1], bbox[5]/2
bbox[3]/2, bbox[4]/2, bbox[5]/2,
(bbox[3]-bbox[0])/2, 0, 0,
0, (bbox[4]-bbox[1])/2, 0,
0, 0, (bbox[5]-bbox[2])/2
]
return obb

Expand All @@ -204,13 +204,6 @@ def generate_tileset_json():
"asset": { "version": "1.0" },
"geometricError": 100.0,
"root": {
"transform":
[
1.0, 0.0, 0.0, 0.0,
0.0, 0.0, -1.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0
],
"boundingVolume": {"box": [0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
Expand Down
2 changes: 1 addition & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run --rm --network=host -v $(pwd):/opt/cesium/cjio cesium
docker run --rm --network=host --name=cesium -v $(pwd):/opt/cesium/cjio cesium

0 comments on commit 58a730a

Please sign in to comment.