From d6bfe730ebdb7a23a241086954f40560a7450ec7 Mon Sep 17 00:00:00 2001 From: guille Date: Wed, 11 Oct 2023 06:00:34 +0200 Subject: [PATCH] add non-standard render position to tileset --- hub/exports/formats/cesiumjs_tileset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hub/exports/formats/cesiumjs_tileset.py b/hub/exports/formats/cesiumjs_tileset.py index 9589a980..50018f5a 100644 --- a/hub/exports/formats/cesiumjs_tileset.py +++ b/hub/exports/formats/cesiumjs_tileset.py @@ -28,6 +28,7 @@ class CesiumjsTileset: 'version': '1.1', "tilesetVersion": "1.2.3" }, + 'position': self._to_gps.transform(self._city.lower_corner[0], self._city.lower_corner[1]), 'schema': { 'id': "building", 'classes': { @@ -108,6 +109,7 @@ class CesiumjsTileset: coordinates = self._ground_coordinates(surface.solid_polygon.coordinates) lower_corner = [min([c[0] for c in coordinates]), min([c[1] for c in coordinates]), 0] upper_corner = [max([c[0] for c in coordinates]), max([c[1] for c in coordinates]), building.max_height] + tile = { 'boundingVolume': { 'box': CesiumjsTileset._box_values(upper_corner, lower_corner)