Correct energy ade export to work with new surfaces
This commit is contained in:
parent
86fe064a25
commit
1c444f3667
|
@ -262,11 +262,9 @@ class EnergyAde:
|
||||||
def _thermal_zones(self, building, city):
|
def _thermal_zones(self, building, city):
|
||||||
thermal_zones = []
|
thermal_zones = []
|
||||||
for index, thermal_zone in enumerate(building.thermal_zones):
|
for index, thermal_zone in enumerate(building.thermal_zones):
|
||||||
print('debug me2')
|
|
||||||
usage_zones = []
|
usage_zones = []
|
||||||
for usage_zone in thermal_zone.usage_zones:
|
for usage_zone in thermal_zone.usage_zones:
|
||||||
usage_zones.append({'@xlink:href': f'#GML_{usage_zone.id}'})
|
usage_zones.append({'@xlink:href': f'#GML_{usage_zone.id}'})
|
||||||
|
|
||||||
thermal_zone_dic = {
|
thermal_zone_dic = {
|
||||||
'energy:ThermalZone': {
|
'energy:ThermalZone': {
|
||||||
'@gml:id': f'GML_{thermal_zone.id}',
|
'@gml:id': f'GML_{thermal_zone.id}',
|
||||||
|
@ -310,6 +308,7 @@ class EnergyAde:
|
||||||
}
|
}
|
||||||
thermal_zone_dic['energy:ThermalZone']['energy:contains'] = usage_zones
|
thermal_zone_dic['energy:ThermalZone']['energy:contains'] = usage_zones
|
||||||
thermal_zones.append(thermal_zone_dic)
|
thermal_zones.append(thermal_zone_dic)
|
||||||
|
print('debug me')
|
||||||
return thermal_zones
|
return thermal_zones
|
||||||
|
|
||||||
def _thermal_boundaries(self, city, thermal_zone):
|
def _thermal_boundaries(self, city, thermal_zone):
|
||||||
|
@ -344,9 +343,9 @@ class EnergyAde:
|
||||||
'@gml:id': f'GML_{uuid.uuid4()}',
|
'@gml:id': f'GML_{uuid.uuid4()}',
|
||||||
'gml:posList': {
|
'gml:posList': {
|
||||||
'@srsDimension': '3',
|
'@srsDimension': '3',
|
||||||
'@count': len(thermal_boundary.surface.points) + 1,
|
'@count': len(thermal_boundary.surface.solid_polygon.points) + 1,
|
||||||
'#text': f'{" ".join(map(str, thermal_boundary.surface.solid_polygon.points_list))} '
|
'#text': f'{" ".join(map(str, thermal_boundary.surface.solid_polygon.points_list))} '
|
||||||
f'{" ".join(map(str, thermal_boundary.surface.points[0]))}'
|
f'{" ".join(map(str, thermal_boundary.surface.solid_polygon.points[0]))}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user