Correct the positions for the boxes

This commit is contained in:
Guille Gutierrez 2023-10-11 17:16:18 +02:00
parent 7cb4600c15
commit fe76d2fe3d
2 changed files with 5 additions and 6 deletions

View File

@ -29,8 +29,6 @@ class CesiumjsTileset:
self._city.upper_corner[2] - self._city.lower_corner[2] self._city.upper_corner[2] - self._city.lower_corner[2]
] ]
city_lower_corner = [0, 0, 0] city_lower_corner = [0, 0, 0]
print('root')
self._tile_set = { self._tile_set = {
'asset': { 'asset': {
'version': '1.1', 'version': '1.1',
@ -80,7 +78,7 @@ class CesiumjsTileset:
} }
} }
}, },
'geometricError': 240, 'geometricError': 500,
'root': { 'root': {
'boundingVolume': { 'boundingVolume': {
'box': CesiumjsTileset._box_values(city_upper_corner, city_lower_corner) 'box': CesiumjsTileset._box_values(city_upper_corner, city_lower_corner)
@ -130,7 +128,7 @@ class CesiumjsTileset:
'boundingVolume': { 'boundingVolume': {
'box': CesiumjsTileset._box_values(upper_corner, lower_corner) 'box': CesiumjsTileset._box_values(upper_corner, lower_corner)
}, },
'geometricError': 70, 'geometricError': 250,
'metadata': { 'metadata': {
'class': 'building', 'class': 'building',
'properties': { 'properties': {

View File

@ -33,7 +33,8 @@ class Glb:
def _export(self): def _export(self):
try: try:
for building in self._city.buildings: for building in self._city.buildings:
city = City(building.lower_corner, building.upper_corner, self._city.srs_name) print(self._city.lower_corner, self._city.upper_corner)
city = City(self._city.lower_corner, self._city.upper_corner, self._city.srs_name)
city.name = building.name city.name = building.name
city.add_city_object(building) city.add_city_object(building)
Obj(city, self._path) Obj(city, self._path)