Compare commits
No commits in common. "04f24e9d91eef9f4749faedaf7ce5d58e2878ac8" and "1bac29118e2db42f3a4f1e2e2f9894f740f1e98c" have entirely different histories.
04f24e9d91
...
1bac29118e
@ -169,7 +169,7 @@ class EnergyAde:
|
|||||||
def _building_geometry(self, building, building_dic, city):
|
def _building_geometry(self, building, building_dic, city):
|
||||||
|
|
||||||
building_dic['bldg:Building']['bldg:function'] = building.function
|
building_dic['bldg:Building']['bldg:function'] = building.function
|
||||||
building_dic['bldg:Building']['bldg:usage'] = building.usages
|
building_dic['bldg:Building']['bldg:usage'] = building.usages_percentage
|
||||||
building_dic['bldg:Building']['bldg:yearOfConstruction'] = building.year_of_construction
|
building_dic['bldg:Building']['bldg:yearOfConstruction'] = building.year_of_construction
|
||||||
building_dic['bldg:Building']['bldg:roofType'] = building.roof_type
|
building_dic['bldg:Building']['bldg:roofType'] = building.roof_type
|
||||||
building_dic['bldg:Building']['bldg:measuredHeight'] = {
|
building_dic['bldg:Building']['bldg:measuredHeight'] = {
|
||||||
|
@ -77,8 +77,8 @@ class CesiumjsTileset:
|
|||||||
'function': {
|
'function': {
|
||||||
'type': 'STRING'
|
'type': 'STRING'
|
||||||
},
|
},
|
||||||
'usages': {
|
'usages_percentage': {
|
||||||
'type': 'LIST'
|
'type': 'STRING'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ class CesiumjsTileset:
|
|||||||
'max_height': building.max_height,
|
'max_height': building.max_height,
|
||||||
'year_of_construction': building.year_of_construction,
|
'year_of_construction': building.year_of_construction,
|
||||||
'function': building.function,
|
'function': building.function,
|
||||||
'usages': building.usages
|
'usages_percentage': building.usages
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'content': {
|
'content': {
|
||||||
|
@ -9,7 +9,6 @@ import datetime
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from sqlalchemy import Column, Integer, String, Sequence, ForeignKey, Float
|
from sqlalchemy import Column, Integer, String, Sequence, ForeignKey, Float
|
||||||
from sqlalchemy.dialects.postgresql import JSON
|
|
||||||
from sqlalchemy import DateTime
|
from sqlalchemy import DateTime
|
||||||
|
|
||||||
from hub.city_model_structure.building import Building
|
from hub.city_model_structure.building import Building
|
||||||
@ -28,7 +27,7 @@ class CityObject(Models):
|
|||||||
type = Column(String, nullable=False)
|
type = Column(String, nullable=False)
|
||||||
year_of_construction = Column(Integer, nullable=True)
|
year_of_construction = Column(Integer, nullable=True)
|
||||||
function = Column(String, nullable=True)
|
function = Column(String, nullable=True)
|
||||||
usage = Column(JSON, nullable=True)
|
usage = Column(String, nullable=True)
|
||||||
volume = Column(Float, nullable=False)
|
volume = Column(Float, nullable=False)
|
||||||
area = Column(Float, nullable=False)
|
area = Column(Float, nullable=False)
|
||||||
total_heating_area = Column(Float, nullable=False)
|
total_heating_area = Column(Float, nullable=False)
|
||||||
@ -47,7 +46,7 @@ class CityObject(Models):
|
|||||||
self.type = building.type
|
self.type = building.type
|
||||||
self.year_of_construction = building.year_of_construction
|
self.year_of_construction = building.year_of_construction
|
||||||
self.function = building.function
|
self.function = building.function
|
||||||
self.usage = building.usages
|
self.usage = building.usages_percentage
|
||||||
self.volume = building.volume
|
self.volume = building.volume
|
||||||
self.area = building.floor_area
|
self.area = building.floor_area
|
||||||
self.roof_area = sum(roof.solid_polygon.area for roof in building.roofs)
|
self.roof_area = sum(roof.solid_polygon.area for roof in building.roofs)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"""
|
"""
|
||||||
Hub version number
|
Hub version number
|
||||||
"""
|
"""
|
||||||
__version__ = '0.3.0.2'
|
__version__ = '0.2.0.19'
|
||||||
|
Loading…
Reference in New Issue
Block a user