Select building based on height
This commit is contained in:
parent
ef9ff1d4d9
commit
e53c506e73
|
@ -273,7 +273,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "MURB_HighRiseApartment",
|
"function": "MURB_HighRiseApartment",
|
||||||
"period_of_construction": "1950_1980",
|
"period_of_construction": "1951_1980",
|
||||||
"climate_zone": "6",
|
"climate_zone": "6",
|
||||||
"average_storey_height": 3,
|
"average_storey_height": 3,
|
||||||
"thermal_capacity": 300,
|
"thermal_capacity": 300,
|
||||||
|
@ -282,7 +282,7 @@
|
||||||
"infiltration_rate_for_ventilation_system_off": 5.0,
|
"infiltration_rate_for_ventilation_system_off": 5.0,
|
||||||
"constructions": {
|
"constructions": {
|
||||||
"OutdoorsWall": {
|
"OutdoorsWall": {
|
||||||
"opaque_surface_name": "1950_1980_6",
|
"opaque_surface_name": "1951_1980_6",
|
||||||
"transparent_surface_name": "Window_1950_1980_6",
|
"transparent_surface_name": "Window_1950_1980_6",
|
||||||
"transparent_ratio": {
|
"transparent_ratio": {
|
||||||
"north": "30.0",
|
"north": "30.0",
|
||||||
|
@ -292,7 +292,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"OutdoorsRoofCeiling": {
|
"OutdoorsRoofCeiling": {
|
||||||
"opaque_surface_name": "1950_1980_6",
|
"opaque_surface_name": "1951_1980_6",
|
||||||
"transparent_surface_name": null,
|
"transparent_surface_name": null,
|
||||||
"transparent_ratio": {
|
"transparent_ratio": {
|
||||||
"north": null,
|
"north": null,
|
||||||
|
@ -302,23 +302,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"OutdoorsFloor": {
|
"OutdoorsFloor": {
|
||||||
"opaque_surface_name": "1950_1980_6"
|
"opaque_surface_name": "1951_1980_6"
|
||||||
},
|
},
|
||||||
"GroundWall": {
|
"GroundWall": {
|
||||||
"opaque_surface_name": "1950_1980_6"
|
"opaque_surface_name": "1951_1980_6"
|
||||||
},
|
},
|
||||||
"GroundRoofCeiling": {
|
"GroundRoofCeiling": {
|
||||||
"opaque_surface_name": "1950_1980_6"
|
"opaque_surface_name": "1951_1980_6"
|
||||||
},
|
},
|
||||||
"GroundFloor": {
|
"GroundFloor": {
|
||||||
"opaque_surface_name": "1950_1980_6"
|
"opaque_surface_name": "1951_1980_6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"function": "MURB_HighRiseApartment",
|
"function": "MURB_HighRiseApartment",
|
||||||
"period_of_construction": "1980_2010",
|
"period_of_construction": "1981_2010",
|
||||||
"climate_zone": "6",
|
"climate_zone": "6",
|
||||||
"average_storey_height": 3,
|
"average_storey_height": 3,
|
||||||
"thermal_capacity": 300,
|
"thermal_capacity": 300,
|
||||||
|
@ -327,8 +327,8 @@
|
||||||
"infiltration_rate_for_ventilation_system_off": 3.0,
|
"infiltration_rate_for_ventilation_system_off": 3.0,
|
||||||
"constructions": {
|
"constructions": {
|
||||||
"OutdoorsWall": {
|
"OutdoorsWall": {
|
||||||
"opaque_surface_name": "1980_2010_6",
|
"opaque_surface_name": "1981_2010_6",
|
||||||
"transparent_surface_name": "Window_1980_2010_6",
|
"transparent_surface_name": "Window_1981_2010_6",
|
||||||
"transparent_ratio": {
|
"transparent_ratio": {
|
||||||
"north": "30.0",
|
"north": "30.0",
|
||||||
"east": "5.0",
|
"east": "5.0",
|
||||||
|
@ -337,7 +337,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"OutdoorsRoofCeiling": {
|
"OutdoorsRoofCeiling": {
|
||||||
"opaque_surface_name": "1980_2010_6",
|
"opaque_surface_name": "1981_2010_6",
|
||||||
"transparent_surface_name": null,
|
"transparent_surface_name": null,
|
||||||
"transparent_ratio": {
|
"transparent_ratio": {
|
||||||
"north": null,
|
"north": null,
|
||||||
|
@ -347,16 +347,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"OutdoorsFloor": {
|
"OutdoorsFloor": {
|
||||||
"opaque_surface_name": "1980_2010_6"
|
"opaque_surface_name": "1981_2010_6"
|
||||||
},
|
},
|
||||||
"GroundWall": {
|
"GroundWall": {
|
||||||
"opaque_surface_name": "1980_2010_6"
|
"opaque_surface_name": "1981_2010_6"
|
||||||
},
|
},
|
||||||
"GroundRoofCeiling": {
|
"GroundRoofCeiling": {
|
||||||
"opaque_surface_name": "1980_2010_6"
|
"opaque_surface_name": "1981_2010_6"
|
||||||
},
|
},
|
||||||
"GroundFloor": {
|
"GroundFloor": {
|
||||||
"opaque_surface_name": "1980_2010_6"
|
"opaque_surface_name": "1981_2010_6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -408,7 +408,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"function": "MURB_HighRiseApartment",
|
"function": "MURB_HighRiseApartment",
|
||||||
"period_of_construction": "2020_3000",
|
"period_of_construction": "2021_3000",
|
||||||
"climate_zone": "6",
|
"climate_zone": "6",
|
||||||
"average_storey_height": 3,
|
"average_storey_height": 3,
|
||||||
"thermal_capacity": 300,
|
"thermal_capacity": 300,
|
||||||
|
|
|
@ -33,6 +33,7 @@ class MontrealFunctionToHubFunction:
|
||||||
'6911': cte.CONVENTION_CENTER,
|
'6911': cte.CONVENTION_CENTER,
|
||||||
'9510': cte.RESIDENTIAL,
|
'9510': cte.RESIDENTIAL,
|
||||||
'1990': cte.MID_RISE_APARTMENT,
|
'1990': cte.MID_RISE_APARTMENT,
|
||||||
|
'2100': cte.HIGH_RISE_APARTMENT,
|
||||||
'1923': cte.NON_HEATED,
|
'1923': cte.NON_HEATED,
|
||||||
'7222': cte.SPORTS_LOCATION,
|
'7222': cte.SPORTS_LOCATION,
|
||||||
'5002': cte.STRIP_MALL,
|
'5002': cte.STRIP_MALL,
|
||||||
|
|
|
@ -127,6 +127,10 @@ class Geojson:
|
||||||
function = None
|
function = None
|
||||||
if self._function_field is not None:
|
if self._function_field is not None:
|
||||||
function = str(feature['properties'][self._function_field])
|
function = str(feature['properties'][self._function_field])
|
||||||
|
if function == '1000':
|
||||||
|
height = float(feature['properties'][self._extrusion_height_field])
|
||||||
|
function = self._define_building_function(height, function)
|
||||||
|
|
||||||
if function == 'Mixed use' or function == 'mixed use':
|
if function == 'Mixed use' or function == 'mixed use':
|
||||||
function_parts = []
|
function_parts = []
|
||||||
if 'usages' in feature['properties']:
|
if 'usages' in feature['properties']:
|
||||||
|
@ -350,3 +354,14 @@ class Geojson:
|
||||||
building.add_alias(alias)
|
building.add_alias(alias)
|
||||||
building.volume = volume
|
building.volume = volume
|
||||||
return building
|
return building
|
||||||
|
|
||||||
|
def _define_building_function(self, height, function):
|
||||||
|
if height < 10:
|
||||||
|
return '1100'
|
||||||
|
if height < 20 and height > 10:
|
||||||
|
return '1990'
|
||||||
|
if height > 20:
|
||||||
|
return '2100'
|
||||||
|
else:
|
||||||
|
return '1000'
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
"name": "01044604",
|
"name": "01044604",
|
||||||
"address": "rue Victor-Hugo (MTL) 1636",
|
"address": "rue Victor-Hugo (MTL) 1636",
|
||||||
"function": "1000",
|
"function": "1000",
|
||||||
"height": 12,
|
"height": 22,
|
||||||
"year_of_construction": 1986
|
"year_of_construction": 1986
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
1
main.py
1
main.py
|
@ -27,6 +27,7 @@ city = GeometryFactory('geojson',
|
||||||
function_field='function',
|
function_field='function',
|
||||||
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
||||||
# Enrich city data
|
# Enrich city data
|
||||||
|
|
||||||
ConstructionFactory('cerc', city).enrich()
|
ConstructionFactory('cerc', city).enrich()
|
||||||
UsageFactory('cerc', city).enrich()
|
UsageFactory('cerc', city).enrich()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user