From 5ec1708a2c4867e7a2f80ae3edddf00915a08a79 Mon Sep 17 00:00:00 2001 From: Guille Gutierrez Date: Tue, 3 Dec 2024 00:42:54 -0500 Subject: [PATCH 1/5] Update hub/version.py --- hub/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/version.py b/hub/version.py index 056f7321..94bd3604 100644 --- a/hub/version.py +++ b/hub/version.py @@ -1,4 +1,4 @@ """ Hub version number """ -__version__ = '0.2.0.19' +__version__ = '0.3.0.0' From a492a9eb0ad54e8511e0fc85e627e77f48de6ed9 Mon Sep 17 00:00:00 2001 From: Connor Brackley Date: Tue, 3 Dec 2024 17:28:00 -0500 Subject: [PATCH 2/5] Remove usages_percentage in favor of usages --- hub/exports/building_energy/energy_ade.py | 2 +- hub/exports/formats/cesiumjs_tileset.py | 6 +++--- hub/persistence/models/city_object.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hub/exports/building_energy/energy_ade.py b/hub/exports/building_energy/energy_ade.py index f1365fed..b8cabd0d 100644 --- a/hub/exports/building_energy/energy_ade.py +++ b/hub/exports/building_energy/energy_ade.py @@ -169,7 +169,7 @@ class EnergyAde: def _building_geometry(self, building, building_dic, city): building_dic['bldg:Building']['bldg:function'] = building.function - building_dic['bldg:Building']['bldg:usage'] = building.usages_percentage + building_dic['bldg:Building']['bldg:usage'] = building.usages building_dic['bldg:Building']['bldg:yearOfConstruction'] = building.year_of_construction building_dic['bldg:Building']['bldg:roofType'] = building.roof_type building_dic['bldg:Building']['bldg:measuredHeight'] = { diff --git a/hub/exports/formats/cesiumjs_tileset.py b/hub/exports/formats/cesiumjs_tileset.py index 15fda133..fef54e89 100644 --- a/hub/exports/formats/cesiumjs_tileset.py +++ b/hub/exports/formats/cesiumjs_tileset.py @@ -77,8 +77,8 @@ class CesiumjsTileset: 'function': { 'type': 'STRING' }, - 'usages_percentage': { - 'type': 'STRING' + 'usages': { + 'type': 'LIST' } } } @@ -146,7 +146,7 @@ class CesiumjsTileset: 'max_height': building.max_height, 'year_of_construction': building.year_of_construction, 'function': building.function, - 'usages_percentage': building.usages + 'usages': building.usages } }, 'content': { diff --git a/hub/persistence/models/city_object.py b/hub/persistence/models/city_object.py index 1d88b9ec..c3b4ae90 100644 --- a/hub/persistence/models/city_object.py +++ b/hub/persistence/models/city_object.py @@ -46,7 +46,7 @@ class CityObject(Models): self.type = building.type self.year_of_construction = building.year_of_construction self.function = building.function - self.usage = building.usages_percentage + self.usage = building.usages self.volume = building.volume self.area = building.floor_area self.roof_area = sum(roof.solid_polygon.area for roof in building.roofs) From 103923b272c6d0f79b56af489268778fac7c3fc3 Mon Sep 17 00:00:00 2001 From: Connor Brackley Date: Tue, 3 Dec 2024 18:41:54 -0500 Subject: [PATCH 3/5] Changed sql usage type to JSON --- hub/persistence/models/city_object.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hub/persistence/models/city_object.py b/hub/persistence/models/city_object.py index c3b4ae90..a93101ec 100644 --- a/hub/persistence/models/city_object.py +++ b/hub/persistence/models/city_object.py @@ -9,6 +9,7 @@ import datetime import logging from sqlalchemy import Column, Integer, String, Sequence, ForeignKey, Float +from sqlalchemy.dialects.postgresql import JSON from sqlalchemy import DateTime from hub.city_model_structure.building import Building @@ -27,7 +28,7 @@ class CityObject(Models): type = Column(String, nullable=False) year_of_construction = Column(Integer, nullable=True) function = Column(String, nullable=True) - usage = Column(String, nullable=True) + usage = Column(JSON, nullable=True) volume = Column(Float, nullable=False) area = Column(Float, nullable=False) total_heating_area = Column(Float, nullable=False) From 0f6a2a5b8fdb6a8c4f49c9f4e244381be94829c2 Mon Sep 17 00:00:00 2001 From: Guille Gutierrez Date: Wed, 4 Dec 2024 00:26:16 -0500 Subject: [PATCH 4/5] Update hub/version.py --- hub/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/version.py b/hub/version.py index 94bd3604..ed70cc44 100644 --- a/hub/version.py +++ b/hub/version.py @@ -1,4 +1,4 @@ """ Hub version number """ -__version__ = '0.3.0.0' +__version__ = '0.3.0.1' From 4da206761a057972fd1c04eb97424a9958294a9c Mon Sep 17 00:00:00 2001 From: Guille Gutierrez Date: Wed, 4 Dec 2024 01:10:53 -0500 Subject: [PATCH 5/5] Update hub/version.py --- hub/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/version.py b/hub/version.py index ed70cc44..757deefb 100644 --- a/hub/version.py +++ b/hub/version.py @@ -1,4 +1,4 @@ """ Hub version number """ -__version__ = '0.3.0.1' +__version__ = '0.3.0.2'