Compare commits
No commits in common. "addb1332d59740cbb002fc77fa17e9a45734e483" and "ea50c6b856aea76fef25bf591d5e5649e80c9fd7" have entirely different histories.
addb1332d5
...
ea50c6b856
@ -2,17 +2,23 @@ import geopandas as gpd
|
|||||||
from shapely.geometry import Polygon, MultiPolygon
|
from shapely.geometry import Polygon, MultiPolygon
|
||||||
from shapely.geometry.polygon import orient
|
from shapely.geometry.polygon import orient
|
||||||
|
|
||||||
input_file = 'data/selected_buildings.geojson'
|
# Path to the input GeoJSON file
|
||||||
|
input_file = 'data/cmm_test.geojson'
|
||||||
|
|
||||||
output_file = 'data/selected_buildings_corrected.geojson'
|
# Path to the output GeoJSON file
|
||||||
|
output_file = 'data/cmm_test_corrected.geojson'
|
||||||
|
|
||||||
|
# Read the GeoJSON file
|
||||||
gdf = gpd.read_file(input_file)
|
gdf = gpd.read_file(input_file)
|
||||||
|
|
||||||
|
# Set the CRS to EPSG:3857 if not already set
|
||||||
if gdf.crs is None:
|
if gdf.crs is None:
|
||||||
gdf.set_crs(epsg=3857, inplace=True)
|
gdf.set_crs(epsg=3857, inplace=True)
|
||||||
|
|
||||||
|
# Convert the CRS to EPSG:4326 (longitude and latitude)
|
||||||
gdf = gdf.to_crs(epsg=4326)
|
gdf = gdf.to_crs(epsg=4326)
|
||||||
|
|
||||||
|
# Function to reorient geometries to follow the right-hand rule
|
||||||
def reorient_geometry(geom):
|
def reorient_geometry(geom):
|
||||||
if geom.is_empty:
|
if geom.is_empty:
|
||||||
return geom
|
return geom
|
||||||
@ -24,6 +30,10 @@ def reorient_geometry(geom):
|
|||||||
else:
|
else:
|
||||||
return geom
|
return geom
|
||||||
|
|
||||||
|
# Apply the reorientation to the geometry column
|
||||||
gdf['geometry'] = gdf['geometry'].apply(reorient_geometry)
|
gdf['geometry'] = gdf['geometry'].apply(reorient_geometry)
|
||||||
|
|
||||||
|
# Save the transformed GeoDataFrame to a new GeoJSON file
|
||||||
gdf.to_file(output_file, driver='GeoJSON')
|
gdf.to_file(output_file, driver='GeoJSON')
|
||||||
|
|
||||||
|
print(f"Converted GeoJSON with right-hand rule orientation has been saved to {output_file}")
|
||||||
|
7
data/cmm_test.geojson
Normal file
7
data/cmm_test.geojson
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"type": "FeatureCollection",
|
||||||
|
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
|
||||||
|
"features": [
|
||||||
|
{ "type": "Feature", "properties": { "cerc_id": 10000000, "provinc_id": "72015684390246800000000", "matricu_18": "684390246800000000", "feature_id": "905021fe-faed-40cb-a193-8b8b9863eb6e", "contr_year": "1986", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "attached", "lot_name": "1461297", "lot_area": 1247.7, "build_area": 145.3, "build_type": "1", "floor_num": 1, "unit_num": 2, "region": "layer_80", "g_objectid": 1169999.0, "g_co_mrc": "720", "g_code_mun": "72015", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.959074500485556, 45.526439602454957 ], [ -73.95906913536642, 45.52644040687705 ], [ -73.959067332931753, 45.526434277213156 ], [ -73.959072648380882, 45.526433504485176 ], [ -73.959074500485556, 45.526439602454957 ] ] ], [ [ [ -73.959284044103711, 45.526434113367664 ], [ -73.959285089854276, 45.526437239705743 ], [ -73.959323607759771, 45.526430905630932 ], [ -73.959339294217543, 45.526477977063195 ], [ -73.959365136004763, 45.526473721285491 ], [ -73.959384577774543, 45.526470522456577 ], [ -73.95939879848838, 45.526513191459713 ], [ -73.95918505777766, 45.526548375245248 ], [ -73.95915412932338, 45.526455490326235 ], [ -73.959284044103711, 45.526434113367664 ] ] ], [ [ [ -73.959318219290097, 45.526552949174281 ], [ -73.959334062104787, 45.526613722737721 ], [ -73.959216751906709, 45.5266288329885 ], [ -73.959200273841773, 45.52656565039198 ], [ -73.95922525487974, 45.526562432921921 ], [ -73.959220722410464, 45.526545052740744 ], [ -73.959294284368852, 45.526535583122445 ], [ -73.959299435528266, 45.526555364285208 ], [ -73.959318219290097, 45.526552949174281 ] ] ], [ [ [ -73.959361589683013, 45.526663537853317 ], [ -73.959418160975417, 45.526683936473432 ], [ -73.959367699213033, 45.526753086934306 ], [ -73.959311113787507, 45.526732688346264 ], [ -73.959361589683013, 45.526663537853317 ] ] ] ] } }
|
||||||
|
]
|
||||||
|
}
|
7
data/cmm_test_corrected.geojson
Normal file
7
data/cmm_test_corrected.geojson
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"type": "FeatureCollection",
|
||||||
|
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
|
||||||
|
"features": [
|
||||||
|
{ "type": "Feature", "properties": { "cerc_id": 10000000, "provinc_id": "72015684390246800000000", "matricu_18": "684390246800000000", "feature_id": "905021fe-faed-40cb-a193-8b8b9863eb6e", "contr_year": "1986", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "attached", "lot_name": "1461297", "lot_area": 1247.7, "build_area": 145.3, "build_type": "1", "floor_num": 1, "unit_num": 2, "region": "layer_80", "g_objectid": 1169999.0, "g_co_mrc": "720", "g_code_mun": "72015", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.959074500485556, 45.526439602454957 ], [ -73.959072648380882, 45.526433504485176 ], [ -73.959067332931753, 45.526434277213156 ], [ -73.95906913536642, 45.52644040687705 ], [ -73.959074500485556, 45.526439602454957 ] ] ], [ [ [ -73.959284044103711, 45.526434113367664 ], [ -73.95915412932338, 45.526455490326235 ], [ -73.95918505777766, 45.526548375245248 ], [ -73.95939879848838, 45.526513191459713 ], [ -73.959384577774543, 45.526470522456577 ], [ -73.959365136004763, 45.526473721285491 ], [ -73.959339294217543, 45.526477977063195 ], [ -73.959323607759771, 45.526430905630932 ], [ -73.959285089854276, 45.526437239705743 ], [ -73.959284044103711, 45.526434113367664 ] ] ], [ [ [ -73.959318219290097, 45.526552949174281 ], [ -73.959299435528266, 45.526555364285208 ], [ -73.959294284368852, 45.526535583122445 ], [ -73.959220722410464, 45.526545052740744 ], [ -73.95922525487974, 45.526562432921921 ], [ -73.959200273841773, 45.52656565039198 ], [ -73.959216751906709, 45.5266288329885 ], [ -73.959334062104787, 45.526613722737721 ], [ -73.959318219290097, 45.526552949174281 ] ] ], [ [ [ -73.959361589683013, 45.526663537853317 ], [ -73.959311113787507, 45.526732688346264 ], [ -73.959367699213033, 45.526753086934306 ], [ -73.959418160975417, 45.526683936473432 ], [ -73.959361589683013, 45.526663537853317 ] ] ] ] } }
|
||||||
|
]
|
||||||
|
}
|
@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "FeatureCollection",
|
|
||||||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
|
|
||||||
"features": [
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10042222, "provinc_id": "66058923687536920000000", "matricu_18": "923687536920000000", "feature_id": "1750228c-42f7-432c-bf99-86164e74e465", "contr_year": "1955", "height": 10.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561273", "lot_area": 421.4, "build_area": 181.0, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1268569.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652847091532934, 45.470789538971239 ], [ -73.652887196872726, 45.470740637941198 ], [ -73.652726589698347, 45.470675341143156 ], [ -73.652651101233815, 45.470767235562192 ], [ -73.652766698497217, 45.470814235766937 ], [ -73.65280209652326, 45.470771133385092 ], [ -73.652847091532934, 45.470789538971239 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10042223, "provinc_id": "66058923687465550000000", "matricu_18": "923687465550000000", "feature_id": "54fe98c5-2500-425c-981a-736b1a8cfa2a", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561274", "lot_area": 409.2, "build_area": 184.4, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3069480.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652747295978074, 45.470643337350687 ], [ -73.652909100761292, 45.470707438418266 ], [ -73.652950294053596, 45.470656535546446 ], [ -73.652904898103273, 45.470638340201873 ], [ -73.652941089903379, 45.470593737565963 ], [ -73.652823598674004, 45.470547139602402 ], [ -73.652747295978074, 45.470643337350687 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10042224, "provinc_id": "66058923687618360000000", "matricu_18": "923687618360000000", "feature_id": "2aa8756a-afd6-42ec-a962-e8c5c996fd7d", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561272", "lot_area": 421.4, "build_area": 179.7, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3462523.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652709790904126, 45.47096133445153 ], [ -73.652749501241331, 45.470911939982749 ], [ -73.652702295654493, 45.470893340246995 ], [ -73.652737089123505, 45.470850340376927 ], [ -73.652622996634648, 45.470805534661345 ], [ -73.652549690921319, 45.470900733936617 ], [ -73.652709790904126, 45.47096133445153 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10042330, "provinc_id": "66058923677831460000000", "matricu_18": "923677831460000000", "feature_id": "156062b2-f371-4410-90d6-09a5739307f6", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561290", "lot_area": 421.4, "build_area": 186.7, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 604572.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653605989751256, 45.470315136029505 ], [ -73.653679197919615, 45.470344039669897 ], [ -73.653768500755149, 45.470231636424167 ], [ -73.653634388908017, 45.470178936397076 ], [ -73.653569990580365, 45.470259932850226 ], [ -73.653631497883566, 45.470284132547583 ], [ -73.653605989751256, 45.470315136029505 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10042331, "provinc_id": "66058923677970620000000", "matricu_18": "923677970620000000", "feature_id": "c37d9815-fc5d-4c33-adc8-106266ee1bfd", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561291", "lot_area": 421.4, "build_area": 186.7, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3484657.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653443793018795, 45.470106935668554 ], [ -73.653359900353067, 45.470219640947249 ], [ -73.653429792557731, 45.470245432125495 ], [ -73.653451292051685, 45.470217038228604 ], [ -73.653516390055771, 45.470242036728898 ], [ -73.653581298430908, 45.470157635493926 ], [ -73.653443793018795, 45.470106935668554 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10042635, "provinc_id": "66058923677254770000000", "matricu_18": "923677254770000000", "feature_id": "4ce656c8-ce53-426c-a843-60ab97cdb3b8", "contr_year": "1955", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561286", "lot_area": 421.4, "build_area": 186.7, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 575398.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654309901222945, 45.470545036155421 ], [ -73.654369890444571, 45.470568536522997 ], [ -73.654345291899205, 45.470599538939211 ], [ -73.65441879851538, 45.470628337318551 ], [ -73.654512194744015, 45.47051053517287 ], [ -73.654449200628335, 45.470485835845707 ], [ -73.654462197967533, 45.470469334851281 ], [ -73.654433893608768, 45.470458336483141 ], [ -73.65441859446058, 45.470477738997204 ], [ -73.654376293669245, 45.470461134583637 ], [ -73.654309901222945, 45.470545036155421 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10042636, "provinc_id": "66058923677115430000000", "matricu_18": "923677115430000000", "feature_id": "b4e089b6-49f8-4c42-be7b-e62ea44b40c0", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561285", "lot_area": 366.8, "build_area": 181.9, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2079549.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654474602084335, 45.470646733951 ], [ -73.65454600053863, 45.470674835917094 ], [ -73.654567994828625, 45.470646533827093 ], [ -73.654620690452504, 45.470667185113932 ], [ -73.654687518212597, 45.470580770397603 ], [ -73.654565394231369, 45.470532632760083 ], [ -73.654474602084335, 45.470646733951 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10043720, "provinc_id": "66058923668865690000000", "matricu_18": "923668865690000000", "feature_id": "56140dca-5192-43d2-8e8f-8b20c0040103", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561245", "lot_area": 351.2, "build_area": 188.7, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3072728.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.655000390259502, 45.471538937399444 ], [ -73.654976201996107, 45.471529740477251 ], [ -73.655002101287067, 45.471495940337249 ], [ -73.654833194115412, 45.471432437671524 ], [ -73.654794998416136, 45.471482837737675 ], [ -73.654833892614178, 45.471497434550578 ], [ -73.654808676852682, 45.471530547142002 ], [ -73.65494021136027, 45.471582045277302 ], [ -73.654951290564128, 45.471567940428017 ], [ -73.654971595977315, 45.471575740660001 ], [ -73.655000390259502, 45.471538937399444 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10043737, "provinc_id": "66058923687765600000000", "matricu_18": "923687765600000000", "feature_id": "c1c56abc-490b-4c53-91ee-6a65882c02f0", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561279", "lot_area": 422.8, "build_area": 194.3, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 426945.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652377898069957, 45.47066073256552 ], [ -73.652491698483658, 45.470707437596616 ], [ -73.652528591770533, 45.470662934038636 ], [ -73.652564495254012, 45.470677737185767 ], [ -73.652582000674897, 45.470656231728007 ], [ -73.652540393489758, 45.47063963650681 ], [ -73.652568999478362, 45.470603736652329 ], [ -73.652405595822898, 45.470551637610889 ], [ -73.652365892713107, 45.470601833718348 ], [ -73.652409198577573, 45.470617135454596 ], [ -73.652377898069957, 45.47066073256552 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10043738, "provinc_id": "66058923687622220000000", "matricu_18": "923687622220000000", "feature_id": "3f5276ec-ad3c-48ee-9168-f427a9b3121d", "contr_year": "1955", "height": 10.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561277", "lot_area": 422.1, "build_area": 181.9, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2072159.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652682194918924, 45.470397941292759 ], [ -73.652767990333388, 45.470284536588274 ], [ -73.652694395553326, 45.470256238478278 ], [ -73.652669992839861, 45.470288536954968 ], [ -73.652608194216455, 45.470265235177678 ], [ -73.652546193182943, 45.470347037712962 ], [ -73.652682194918924, 45.470397941292759 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10043739, "provinc_id": "66058923687684350000000", "matricu_18": "923687684350000000", "feature_id": "f4d1865c-b04a-4cbd-8e7c-01883cbf8430", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561278", "lot_area": 407.9, "build_area": 194.3, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2564351.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.65242779386287, 45.470516936839878 ], [ -73.652588789856551, 45.47058253858895 ], [ -73.652665896524738, 45.470488940432411 ], [ -73.6525446903279, 45.470439439736488 ], [ -73.652507391368388, 45.470484738409013 ], [ -73.652467799420805, 45.470468437420209 ], [ -73.65242779386287, 45.470516936839878 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10043740, "provinc_id": "66058923687473140000000", "matricu_18": "923687473140000000", "feature_id": "98755cb0-ab11-40dd-9585-a4796de152bb", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561276", "lot_area": 468.2, "build_area": 179.2, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3421553.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652744990388442, 45.470422335911962 ], [ -73.652878699588598, 45.47047473427105 ], [ -73.652966895020114, 45.470363135801364 ], [ -73.652893894189305, 45.470334636358771 ], [ -73.652870691368861, 45.470364639558653 ], [ -73.652809495889926, 45.470340739584152 ], [ -73.652744990388442, 45.470422335911962 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10043915, "provinc_id": "66058923668794320000000", "matricu_18": "923668794320000000", "feature_id": "54e13aab-5c28-4a5b-8b04-84416a66bd8d", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561246", "lot_area": 351.2, "build_area": 184.4, "build_type": "2", "floor_num": 0, "unit_num": 1, "region": "layer_83", "g_objectid": 1032833.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.65502879476135, 45.471462137313608 ], [ -73.65510579333538, 45.471364204902599 ], [ -73.654980539200722, 45.471315665234386 ], [ -73.654942190526796, 45.471363836634637 ], [ -73.654902797420775, 45.471348238104071 ], [ -73.654863696987903, 45.471397936639484 ], [ -73.65502879476135, 45.471462137313608 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10043999, "provinc_id": "66058923687847130000000", "matricu_18": "923687847130000000", "feature_id": "c319d1cb-a096-4b1a-b551-e206566b44f8", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561280", "lot_area": 423.3, "build_area": 194.3, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2648595.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652237589070779, 45.470775335345522 ], [ -73.652390499710066, 45.470833634180686 ], [ -73.652458391332928, 45.470745333270067 ], [ -73.652342591262382, 45.470701235033637 ], [ -73.652309396508116, 45.470744334335826 ], [ -73.652272398907328, 45.47073023534864 ], [ -73.652237589070779, 45.470775335345522 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10044210, "provinc_id": "66058923678380310000000", "matricu_18": "923678380310000000", "feature_id": "6cbd0310-aae5-47c4-80a3-d2f76cf2c937", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561255", "lot_area": 390.1, "build_area": 181.9, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 972036.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654273794664334, 45.471091137092834 ], [ -73.654349437965422, 45.470993054041529 ], [ -73.654226789315018, 45.470945493557068 ], [ -73.654189800598729, 45.4709930374772 ], [ -73.654150296214866, 45.470977733086684 ], [ -73.654110894469554, 45.471028238938018 ], [ -73.654273794664334, 45.471091137092834 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10044211, "provinc_id": "66058923678161510000000", "matricu_18": "923678161510000000", "feature_id": "b6b13e9c-1aa6-40eb-98b3-cc9d78d3cdd6", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561252", "lot_area": 390.1, "build_area": 184.4, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1239371.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654590597199189, 45.471148033612579 ], [ -73.654628130965548, 45.471101125918594 ], [ -73.654513780671437, 45.471056783164684 ], [ -73.654436291825164, 45.471153840292544 ], [ -73.654596390395241, 45.471217132307771 ], [ -73.654636901158298, 45.471166335938058 ], [ -73.654590597199189, 45.471148033612579 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10044212, "provinc_id": "66058923678461740000000", "matricu_18": "923678461740000000", "feature_id": "13439744-342a-473c-888e-4a438b367918", "contr_year": "1955", "height": 10.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561256", "lot_area": 390.2, "build_area": 191.7, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2301619.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654031196457751, 45.471136639557891 ], [ -73.654059889234489, 45.471146933819433 ], [ -73.654032942866309, 45.471183835136578 ], [ -73.654163546309576, 45.471234481468947 ], [ -73.65422669384283, 45.471148233970347 ], [ -73.654065200116378, 45.471089940174615 ], [ -73.654031196457751, 45.471136639557891 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10044213, "provinc_id": "66058923677318970000000", "matricu_18": "923677318970000000", "feature_id": "6cbd0310-aae5-47c4-80a3-d2f76cf2c937", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561254", "lot_area": 385.8, "build_area": 180.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3061137.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654214896814992, 45.470894940846435 ], [ -73.654254298540138, 45.4709101337723 ], [ -73.654226789315018, 45.470945493557068 ], [ -73.654349437965422, 45.470993054041529 ], [ -73.65441369154685, 45.470909736646639 ], [ -73.654251995269064, 45.470847336479324 ], [ -73.654214896814992, 45.470894940846435 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10044221, "provinc_id": "66058923676679500000000", "matricu_18": "923676679500000000", "feature_id": "da284366-dbbc-4733-ba40-8f3df72eba77", "contr_year": "1960", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561525", "lot_area": 338.9, "build_area": 224.2, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 774848.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653749352276677, 45.470095004041376 ], [ -73.653903102189417, 45.470156339416491 ], [ -73.653990099147322, 45.470048432942882 ], [ -73.653833231779103, 45.469985805200686 ], [ -73.653749352276677, 45.470095004041376 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10044222, "provinc_id": "66058923677381160000000", "matricu_18": "923677381160000000", "feature_id": "f8c64e08-3c4b-44d5-ab0e-8f2a4ea9b154", "contr_year": "1956", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561500", "lot_area": 403.6, "build_area": 226.8, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1458855.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654370090632497, 45.470188833588637 ], [ -73.654209598243682, 45.470130039218276 ], [ -73.654138300832201, 45.470226434511275 ], [ -73.654298794724468, 45.470285237977279 ], [ -73.654370090632497, 45.470188833588637 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10044833, "provinc_id": "66058923687313910000000", "matricu_18": "923687313910000000", "feature_id": "64d949d2-6102-49b7-96e6-8577083b0edc", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561275", "lot_area": 421.4, "build_area": 186.7, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2957818.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652925197637231, 45.470491440701977 ], [ -73.653055998525844, 45.470541336669136 ], [ -73.653117592376589, 45.47046143758471 ], [ -73.653059898345532, 45.470440838193731 ], [ -73.653086697989821, 45.470404434914023 ], [ -73.653013797140815, 45.470376533813322 ], [ -73.652925197637231, 45.470491440701977 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10045659, "provinc_id": "66058923667764630000000", "matricu_18": "923667764630000000", "feature_id": "cbe2e8c9-2379-4afe-9a76-9b32aada7782", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561504", "lot_area": 524.3, "build_area": 224.1, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 318123.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.655148200995669, 45.470498338611812 ], [ -73.654991893972763, 45.470432034024839 ], [ -73.654906892082153, 45.470531036350238 ], [ -73.655063299294213, 45.470597435400443 ], [ -73.655148200995669, 45.470498338611812 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10045660, "provinc_id": "66058923667866940000000", "matricu_18": "923667866940000000", "feature_id": "2e57e522-c883-4df6-886d-d9ce5b21ff3b", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561283", "lot_area": 366.8, "build_area": 124.6, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1038210.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654868197231835, 45.470796336171801 ], [ -73.65488510239112, 45.470771238981378 ], [ -73.654942400269036, 45.470790186765306 ], [ -73.655008962606558, 45.470704115064933 ], [ -73.654891193528343, 45.470653436094814 ], [ -73.654794495507687, 45.470764638136217 ], [ -73.654868197231835, 45.470796336171801 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10045661, "provinc_id": "66058923667923790000000", "matricu_18": "923667923790000000", "feature_id": "59ecfefc-ffe9-4c03-ab59-3aad5238c0ff", "contr_year": "1957", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561503", "lot_area": 403.6, "build_area": 213.0, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1551652.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654959699979329, 45.470414835711097 ], [ -73.654800800141757, 45.470353339568668 ], [ -73.654726598493937, 45.470448134731456 ], [ -73.654885499823777, 45.4705096408724 ], [ -73.654959699979329, 45.470414835711097 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10046229, "provinc_id": "66058923688162340000000", "matricu_18": "923688162340000000", "feature_id": "6b10c1b5-7dd3-4eb0-9cf1-d37b562afd08", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561265", "lot_area": 468.2, "build_area": 181.9, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 640821.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653177488929643, 45.47129324081115 ], [ -73.653251693991763, 45.471317732328437 ], [ -73.65332899735516, 45.471201433904078 ], [ -73.653190701191122, 45.471158532928456 ], [ -73.653143192802858, 45.471236041159678 ], [ -73.653203294770762, 45.471257635207799 ], [ -73.653177488929643, 45.47129324081115 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10046230, "provinc_id": "66058923688013190000000", "matricu_18": "923688013190000000", "feature_id": "1e15f0bc-2c56-4ad4-b7b7-e2dded5e0354", "contr_year": "1955", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561264", "lot_area": 421.4, "build_area": 181.9, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1677189.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653398601110396, 45.471335434917606 ], [ -73.653461195683434, 45.471360236140249 ], [ -73.653525598981588, 45.471279139874326 ], [ -73.653392296535372, 45.471226740833735 ], [ -73.653303293667534, 45.471338839214397 ], [ -73.653373995844191, 45.471366635995906 ], [ -73.653398601110396, 45.471335434917606 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10046595, "provinc_id": "66058923678951060000000", "matricu_18": "923678951060000000", "feature_id": "2462ebab-6ea3-45b9-b9f9-69f463961077", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561263", "lot_area": 413.6, "build_area": 181.8, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 6139.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653599290793167, 45.471153238441815 ], [ -73.653640489069332, 45.471106632993028 ], [ -73.653489396367107, 45.471040340939979 ], [ -73.653410995239696, 45.471128932827199 ], [ -73.65352389317566, 45.471178439265429 ], [ -73.653561396878132, 45.47113614008488 ], [ -73.653599290793167, 45.471153238441815 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10047487, "provinc_id": "66058923678007910000000", "matricu_18": "923678007910000000", "feature_id": "4e83bafb-706f-4c80-852d-ccaf9025bcf1", "contr_year": "1955", "height": 9.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561242", "lot_area": 351.2, "build_area": 179.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1294990.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654628499533743, 45.471698939492192 ], [ -73.65467030104854, 45.471714532155794 ], [ -73.65464392616839, 45.471748974454762 ], [ -73.654768424435602, 45.471797265354809 ], [ -73.654833699615367, 45.471712337422993 ], [ -73.654666993333919, 45.471648938612546 ], [ -73.654628499533743, 45.471698939492192 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10047488, "provinc_id": "66058923668869730000000", "matricu_18": "923668869730000000", "feature_id": "491fc9f1-ef33-4236-96c1-b2899feb8e31", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561241", "lot_area": 390.2, "build_area": 186.7, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2726812.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654826995210016, 45.47192293884126 ], [ -73.654898799955831, 45.471950236465652 ], [ -73.65491769273595, 45.471925533413163 ], [ -73.654968595623302, 45.471944898383917 ], [ -73.655035189732317, 45.471859206378547 ], [ -73.654912090321673, 45.471812334732739 ], [ -73.654826995210016, 45.47192293884126 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10047490, "provinc_id": "66058923668936720000000", "matricu_18": "923668936720000000", "feature_id": "56140dca-5192-43d2-8e8f-8b20c0040103", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561244", "lot_area": 351.2, "build_area": 179.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 12148.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.65486409822843, 45.471678939747548 ], [ -73.65494021136027, 45.471582045277302 ], [ -73.654808676852682, 45.471530547142002 ], [ -73.654771599294008, 45.47157923597279 ], [ -73.654741898987638, 45.471568235975077 ], [ -73.654703894599507, 45.471616635388195 ], [ -73.65486409822843, 45.471678939747548 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10047542, "provinc_id": "66058923677072930000000", "matricu_18": "923677072930000000", "feature_id": "dcefc5d5-80cd-4712-819d-65ad395a8277", "contr_year": "1956", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561502", "lot_area": 403.6, "build_area": 205.4, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 822699.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654609901467467, 45.470277535740024 ], [ -73.654533689954604, 45.470376839939142 ], [ -73.654689893996945, 45.470436139974673 ], [ -73.654765991211093, 45.470336733244544 ], [ -73.654609901467467, 45.470277535740024 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048023, "provinc_id": "66058923686276230000000", "matricu_18": "923686276230000000", "feature_id": "d842964d-21bb-4c89-8801-2d8d0821b35e", "contr_year": "1956", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561517", "lot_area": 488.9, "build_area": 264.6, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1098046.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652972600121103, 45.4697924389774 ], [ -73.653162591448009, 45.469869435464908 ], [ -73.653252095092611, 45.469760240303586 ], [ -73.653151089007039, 45.469721637300829 ], [ -73.653138093657759, 45.469737534347296 ], [ -73.653047697218526, 45.469700735622339 ], [ -73.652972600121103, 45.4697924389774 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048024, "provinc_id": "66058923686097120000000", "matricu_18": "923686097120000000", "feature_id": "ef766114-0166-4782-b14b-4d688b40e6ba", "contr_year": "1957", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561518", "lot_area": 437.8, "build_area": 239.8, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3414305.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.65320148899599, 45.46987733706186 ], [ -73.653390900036641, 45.469941035988434 ], [ -73.653456795924569, 45.469844041016181 ], [ -73.653267397899739, 45.46978033318188 ], [ -73.65320148899599, 45.46987733706186 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048056, "provinc_id": "66058923678385510000000", "matricu_18": "923678385510000000", "feature_id": "f9c3f49c-8316-48da-aee8-c694e3100c15", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561248", "lot_area": 390.2, "build_area": 179.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 866768.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654195894862454, 45.471452735553861 ], [ -73.654132940050715, 45.471535693826077 ], [ -73.654255943268993, 45.471583392504201 ], [ -73.65428210112988, 45.471549038772054 ], [ -73.654325100176081, 45.471565337225492 ], [ -73.654362999996195, 45.471515537915721 ], [ -73.654195894862454, 45.471452735553861 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048057, "provinc_id": "66058923678314240000000", "matricu_18": "923678314240000000", "feature_id": "9b00ca80-cd65-4c1c-9978-8d71137b1f41", "contr_year": "1955", "height": 6.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561250", "lot_area": 390.2, "build_area": 179.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1009896.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654408296870102, 45.471391636003418 ], [ -73.654444985099204, 45.471343619102058 ], [ -73.654319022207275, 45.471294771918565 ], [ -73.654305293248498, 45.47131273883528 ], [ -73.654277197771222, 45.471302036197777 ], [ -73.65426009299928, 45.471324441219934 ], [ -73.654231901150482, 45.471314041050405 ], [ -73.654228998674441, 45.471342436976329 ], [ -73.654266997700333, 45.4713529345835 ], [ -73.654237694155384, 45.471392132843746 ], [ -73.654408193732877, 45.471456438702106 ], [ -73.654446594386556, 45.47140603758811 ], [ -73.654408296870102, 45.471391636003418 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048058, "provinc_id": "66058923678614390000000", "matricu_18": "923678614390000000", "feature_id": "e1e96159-caf8-4bde-9ed9-2feb13af3f7e", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561258", "lot_area": 390.2, "build_area": 181.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1581180.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.6538797952892, 45.471393333618082 ], [ -73.653852942513012, 45.471427114991805 ], [ -73.653978234423178, 45.471475701736814 ], [ -73.654043796576445, 45.471392532167933 ], [ -73.653876689475865, 45.471327333044968 ], [ -73.653837591744193, 45.471376940340981 ], [ -73.6538797952892, 45.471393333618082 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048059, "provinc_id": "66058923678466950000000", "matricu_18": "923678466950000000", "feature_id": "f9c3f49c-8316-48da-aee8-c694e3100c15", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561249", "lot_area": 390.2, "build_area": 184.4, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3545809.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654223201570275, 45.471697537446317 ], [ -73.65425999115395, 45.471649038151568 ], [ -73.654217991000237, 45.47163323864077 ], [ -73.654255943268993, 45.471583392504201 ], [ -73.654132940050715, 45.471535693826077 ], [ -73.654057401941927, 45.471635236136279 ], [ -73.654223201570275, 45.471697537446317 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048672, "provinc_id": "66058923676948060000000", "matricu_18": "923676948060000000", "feature_id": "8699acea-8dfb-46cd-87b8-55484ce2ac5d", "contr_year": "1957", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561519", "lot_area": 406.7, "build_area": 216.8, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2395365.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653415688843594, 45.469952735820264 ], [ -73.653584096878546, 45.470016436536504 ], [ -73.653658691277286, 45.469918837653061 ], [ -73.6534902962361, 45.469855136128402 ], [ -73.653415688843594, 45.469952735820264 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048785, "provinc_id": "66058923687026990000000", "matricu_18": "923687026990000000", "feature_id": "0052248e-9fd9-4f2e-8852-e4af9d8e5d5c", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561269", "lot_area": 421.4, "build_area": 179.4, "build_type": "1", "floor_num": 0, "unit_num": 1, "region": "layer_83", "g_objectid": 1578936.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653331593451014, 45.470769336837492 ], [ -73.653448793775809, 45.470816335999849 ], [ -73.653524298033417, 45.470722232805706 ], [ -73.653363499570148, 45.470658333724451 ], [ -73.653320890341547, 45.470709037979645 ], [ -73.653365898169085, 45.470726938529602 ], [ -73.653331593451014, 45.470769336837492 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10048960, "provinc_id": "66058923669730520000000", "matricu_18": "923669730520000000", "feature_id": "491fc9f1-ef33-4236-96c1-b2899feb8e31", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561239", "lot_area": 428.3, "build_area": 186.7, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1218879.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.65516999374239, 45.471910534236727 ], [ -73.655035189732317, 45.471859206378547 ], [ -73.654968595623302, 45.471944898383917 ], [ -73.655031000644058, 45.471968638080085 ], [ -73.655008097006856, 45.471998437933863 ], [ -73.655080991705489, 45.47202623877903 ], [ -73.65516999374239, 45.471910534236727 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10049152, "provinc_id": "66058923688311420000000", "matricu_18": "923688311420000000", "feature_id": "e0cd772e-9689-4415-a183-4d223b889336", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561266", "lot_area": 421.4, "build_area": 181.9, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 183656.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.652987701614876, 45.471213539150874 ], [ -73.653056199794548, 45.471240834266737 ], [ -73.65314329542889, 45.471132734859211 ], [ -73.653013892754515, 45.471081136411229 ], [ -73.652948696020133, 45.471162237053228 ], [ -73.653009788929154, 45.471186637402681 ], [ -73.652987701614876, 45.471213539150874 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10049185, "provinc_id": "66058923687189840000000", "matricu_18": "923687189840000000", "feature_id": "dc93eb84-ab30-46b7-9089-19f6578f49b4", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561267", "lot_area": 413.6, "build_area": 179.5, "build_type": "1", "floor_num": 0, "unit_num": 1, "region": "layer_83", "g_objectid": 320820.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.65312699650984, 45.471027341300875 ], [ -73.653247899419071, 45.471074234020861 ], [ -73.653321499774137, 45.470980037235584 ], [ -73.653156996081108, 45.470916732240283 ], [ -73.653118398067264, 45.470966341323241 ], [ -73.653161796430254, 45.470983034714287 ], [ -73.65312699650984, 45.471027341300875 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10049186, "provinc_id": "66058923687108410000000", "matricu_18": "923687108410000000", "feature_id": "2a861b62-0eed-46c9-b6e8-8fff09dbc748", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "detached", "lot_name": "1561268", "lot_area": 421.4, "build_area": 179.5, "build_type": "1", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 484029.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.653185993940738, 45.470882533320498 ], [ -73.653343099695078, 45.470945636741547 ], [ -73.653416689761514, 45.470854838633109 ], [ -73.653304091983983, 45.470809632957575 ], [ -73.653270493009515, 45.470851040466357 ], [ -73.65322629667989, 45.47083293632484 ], [ -73.653185993940738, 45.470882533320498 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10049961, "provinc_id": "66058923678090240000000", "matricu_18": "923678090240000000", "feature_id": "b6b13e9c-1aa6-40eb-98b3-cc9d78d3cdd6", "contr_year": "1955", "height": 7.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561253", "lot_area": 387.9, "build_area": 179.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 1751779.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.65465629144893, 45.471065933427973 ], [ -73.654699391732819, 45.47108333571849 ], [ -73.654738202607007, 45.471033940877646 ], [ -73.654572692090127, 45.470974436644759 ], [ -73.654541794143, 45.471010833216347 ], [ -73.654508492392068, 45.470996439302851 ], [ -73.654481396238566, 45.47102893887228 ], [ -73.654522999627531, 45.471045235540792 ], [ -73.654513780671437, 45.471056783164684 ], [ -73.654628130965548, 45.471101125918594 ], [ -73.65465629144893, 45.471065933427973 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10049962, "provinc_id": "66058923678242960000000", "matricu_18": "923678242960000000", "feature_id": "9b00ca80-cd65-4c1c-9978-8d71137b1f41", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561251", "lot_area": 390.2, "build_area": 179.5, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 2671476.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654548596710114, 45.471274733269581 ], [ -73.654382392204496, 45.471211839974565 ], [ -73.654319022207275, 45.471294771918565 ], [ -73.654444985099204, 45.471343619102058 ], [ -73.65447110100672, 45.471309439952407 ], [ -73.654510602042322, 45.471324338404166 ], [ -73.654548596710114, 45.471274733269581 ] ] ] ] } },
|
|
||||||
{ "type": "Feature", "properties": { "cerc_id": 10049989, "provinc_id": "66058923678543010000000", "matricu_18": "923678543010000000", "feature_id": "13439744-342a-473c-888e-4a438b367918", "contr_year": "1955", "height": 8.0, "function_c": 1000.0, "function_n": "Résidentiel", "adjacency": "semi-detached", "lot_name": "1561257", "lot_area": 390.2, "build_area": 190.9, "build_type": "2", "floor_num": 2, "unit_num": 1, "region": "layer_83", "g_objectid": 3023363.0, "g_co_mrc": "66023", "g_code_mun": "66058", "g_nb_locau": 0.0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.654092192768559, 45.471331936811204 ], [ -73.654163546309576, 45.471234481468947 ], [ -73.654032942866309, 45.471183835136578 ], [ -73.653997595770761, 45.471232239733126 ], [ -73.653961696465771, 45.47121923852815 ], [ -73.653923889899374, 45.471270934461494 ], [ -73.654092192768559, 45.471331936811204 ] ] ] ] } }
|
|
||||||
]
|
|
||||||
}
|
|
@ -27,7 +27,7 @@ class Building(CityObject):
|
|||||||
"""
|
"""
|
||||||
Building(CityObject) class
|
Building(CityObject) class
|
||||||
"""
|
"""
|
||||||
def __init__(self, name, surfaces, year_of_construction, function, adjacency, lot_area, build_area, terrains=None, city=None):
|
def __init__(self, name, surfaces, year_of_construction, function, adjacency, terrains=None, city=None):
|
||||||
super().__init__(name, surfaces)
|
super().__init__(name, surfaces)
|
||||||
self._city = city
|
self._city = city
|
||||||
self._households = None
|
self._households = None
|
||||||
@ -37,8 +37,6 @@ class Building(CityObject):
|
|||||||
self._year_of_construction = year_of_construction
|
self._year_of_construction = year_of_construction
|
||||||
self._function = function
|
self._function = function
|
||||||
self._adjacency = adjacency
|
self._adjacency = adjacency
|
||||||
self._lot_area = lot_area
|
|
||||||
self._build_area = build_area
|
|
||||||
self._average_storey_height = None
|
self._average_storey_height = None
|
||||||
self._storeys_above_ground = None
|
self._storeys_above_ground = None
|
||||||
self._floor_area = None
|
self._floor_area = None
|
||||||
@ -58,7 +56,6 @@ class Building(CityObject):
|
|||||||
self._cooling_consumption = {}
|
self._cooling_consumption = {}
|
||||||
self._domestic_hot_water_consumption = {}
|
self._domestic_hot_water_consumption = {}
|
||||||
self._distribution_systems_electrical_consumption = {}
|
self._distribution_systems_electrical_consumption = {}
|
||||||
self._self_sufficiency = {}
|
|
||||||
self._onsite_electrical_production = {}
|
self._onsite_electrical_production = {}
|
||||||
self._eave_height = None
|
self._eave_height = None
|
||||||
self._energy_systems = None
|
self._energy_systems = None
|
||||||
@ -282,44 +279,6 @@ class Building(CityObject):
|
|||||||
else:
|
else:
|
||||||
self._adjacency = None
|
self._adjacency = None
|
||||||
|
|
||||||
@property
|
|
||||||
def lot_area(self):
|
|
||||||
"""
|
|
||||||
Get building lot area
|
|
||||||
:return: float
|
|
||||||
"""
|
|
||||||
return self._lot_area
|
|
||||||
|
|
||||||
@lot_area.setter
|
|
||||||
def lot_area(self, value):
|
|
||||||
"""
|
|
||||||
Set building lot area
|
|
||||||
:param value: float
|
|
||||||
"""
|
|
||||||
if value is not None:
|
|
||||||
self._lot_area = float(value)
|
|
||||||
else:
|
|
||||||
self._lot_area = None
|
|
||||||
|
|
||||||
@property
|
|
||||||
def build_area(self):
|
|
||||||
"""
|
|
||||||
Get building build area
|
|
||||||
:return: float
|
|
||||||
"""
|
|
||||||
return self._build_area
|
|
||||||
|
|
||||||
@build_area.setter
|
|
||||||
def build_area(self, value):
|
|
||||||
"""
|
|
||||||
Set building build area
|
|
||||||
:param value: float
|
|
||||||
"""
|
|
||||||
if value is not None:
|
|
||||||
self._build_area = float(value)
|
|
||||||
else:
|
|
||||||
self._build_area = None
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def average_storey_height(self) -> Union[None, float]:
|
def average_storey_height(self) -> Union[None, float]:
|
||||||
"""
|
"""
|
||||||
@ -840,14 +799,6 @@ class Building(CityObject):
|
|||||||
|
|
||||||
return self._distribution_systems_electrical_consumption
|
return self._distribution_systems_electrical_consumption
|
||||||
|
|
||||||
@distribution_systems_electrical_consumption.setter
|
|
||||||
def distribution_systems_electrical_consumption(self, value):
|
|
||||||
"""
|
|
||||||
attribute to set the total electricity consumption in kWh
|
|
||||||
:param value: float
|
|
||||||
"""
|
|
||||||
self._distribution_systems_electrical_consumption = value
|
|
||||||
|
|
||||||
def _calculate_consumption(self, consumption_type, demand):
|
def _calculate_consumption(self, consumption_type, demand):
|
||||||
# todo: modify when COP depends on the hour
|
# todo: modify when COP depends on the hour
|
||||||
coefficient_of_performance = 0
|
coefficient_of_performance = 0
|
||||||
@ -1021,18 +972,3 @@ class Building(CityObject):
|
|||||||
"""
|
"""
|
||||||
self._pv_generation = value
|
self._pv_generation = value
|
||||||
|
|
||||||
@property
|
|
||||||
def self_sufficiency(self):
|
|
||||||
"""
|
|
||||||
temporary attribute to get the self-sufficiency in kWh
|
|
||||||
:return: dict
|
|
||||||
"""
|
|
||||||
return self._self_sufficiency
|
|
||||||
|
|
||||||
@self_sufficiency.setter
|
|
||||||
def self_sufficiency(self, value):
|
|
||||||
"""
|
|
||||||
temporary attribute to set the self-sufficiency in kWh
|
|
||||||
:param value: float
|
|
||||||
"""
|
|
||||||
self._self_sufficiency = value
|
|
@ -36,8 +36,6 @@ class Geojson:
|
|||||||
function_field=None,
|
function_field=None,
|
||||||
function_to_hub=None,
|
function_to_hub=None,
|
||||||
adjacency_field=None,
|
adjacency_field=None,
|
||||||
lot_area_field=None,
|
|
||||||
build_area_field=None,
|
|
||||||
hub_crs=None
|
hub_crs=None
|
||||||
):
|
):
|
||||||
self._hub_crs = hub_crs
|
self._hub_crs = hub_crs
|
||||||
@ -55,8 +53,6 @@ class Geojson:
|
|||||||
self._year_of_construction_field = year_of_construction_field
|
self._year_of_construction_field = year_of_construction_field
|
||||||
self._function_field = function_field
|
self._function_field = function_field
|
||||||
self._adjacency_field = adjacency_field
|
self._adjacency_field = adjacency_field
|
||||||
self._lot_area_field = lot_area_field
|
|
||||||
self._build_area_field = build_area_field
|
|
||||||
self._function_to_hub = function_to_hub
|
self._function_to_hub = function_to_hub
|
||||||
with open(path, 'r', encoding='utf8') as json_file:
|
with open(path, 'r', encoding='utf8') as json_file:
|
||||||
self._geojson = json.loads(json_file.read())
|
self._geojson = json.loads(json_file.read())
|
||||||
@ -133,12 +129,6 @@ class Geojson:
|
|||||||
adjacency = None
|
adjacency = None
|
||||||
if self._adjacency_field is not None:
|
if self._adjacency_field is not None:
|
||||||
adjacency = str(feature['properties'][self._adjacency_field])
|
adjacency = str(feature['properties'][self._adjacency_field])
|
||||||
lot_area = None
|
|
||||||
if self._lot_area_field is not None:
|
|
||||||
lot_area = float(feature['properties'][self._lot_area_field])
|
|
||||||
build_area = None
|
|
||||||
if self._build_area_field is not None:
|
|
||||||
build_area = float(feature['properties'][self._build_area_field])
|
|
||||||
function = None
|
function = None
|
||||||
if self._function_field is not None:
|
if self._function_field is not None:
|
||||||
function = str(int(feature['properties'][self._function_field]))
|
function = str(int(feature['properties'][self._function_field]))
|
||||||
@ -187,8 +177,6 @@ class Geojson:
|
|||||||
function,
|
function,
|
||||||
year_of_construction,
|
year_of_construction,
|
||||||
adjacency,
|
adjacency,
|
||||||
lot_area,
|
|
||||||
build_area,
|
|
||||||
extrusion_height))
|
extrusion_height))
|
||||||
|
|
||||||
elif str(geometry['type']).lower() == 'multipolygon':
|
elif str(geometry['type']).lower() == 'multipolygon':
|
||||||
@ -198,8 +186,6 @@ class Geojson:
|
|||||||
function,
|
function,
|
||||||
year_of_construction,
|
year_of_construction,
|
||||||
adjacency,
|
adjacency,
|
||||||
lot_area,
|
|
||||||
build_area,
|
|
||||||
extrusion_height))
|
extrusion_height))
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError(f'Geojson geometry type [{geometry["type"]}] unknown')
|
raise NotImplementedError(f'Geojson geometry type [{geometry["type"]}] unknown')
|
||||||
@ -224,7 +210,7 @@ class Geojson:
|
|||||||
transformed_coordinates = f'{transformed_coordinates} {transformed[self._X]} {transformed[self._Y]} 0.0'
|
transformed_coordinates = f'{transformed_coordinates} {transformed[self._X]} {transformed[self._Y]} 0.0'
|
||||||
return transformed_coordinates.lstrip(' ')
|
return transformed_coordinates.lstrip(' ')
|
||||||
|
|
||||||
def _parse_polygon(self, coordinates, building_name, building_aliases, function, year_of_construction, adjacency, lot_area, build_area, extrusion_height):
|
def _parse_polygon(self, coordinates, building_name, building_aliases, function, year_of_construction, adjacency, extrusion_height):
|
||||||
surfaces = []
|
surfaces = []
|
||||||
for polygon_coordinates in coordinates:
|
for polygon_coordinates in coordinates:
|
||||||
points = igh.points_from_string(
|
points = igh.points_from_string(
|
||||||
@ -257,7 +243,7 @@ class Geojson:
|
|||||||
polygon = Polygon(coordinates)
|
polygon = Polygon(coordinates)
|
||||||
polygon.area = igh.ground_area(coordinates)
|
polygon.area = igh.ground_area(coordinates)
|
||||||
surfaces[-1] = Surface(polygon, polygon)
|
surfaces[-1] = Surface(polygon, polygon)
|
||||||
building = Building(f'{building_name}', surfaces, year_of_construction, function, adjacency, lot_area, build_area)
|
building = Building(f'{building_name}', surfaces, year_of_construction, function, adjacency)
|
||||||
for alias in building_aliases:
|
for alias in building_aliases:
|
||||||
building.add_alias(alias)
|
building.add_alias(alias)
|
||||||
if extrusion_height == 0:
|
if extrusion_height == 0:
|
||||||
@ -298,7 +284,7 @@ class Geojson:
|
|||||||
building.volume = volume
|
building.volume = volume
|
||||||
return building
|
return building
|
||||||
|
|
||||||
def _parse_multi_polygon(self, polygons_coordinates, building_name, building_aliases, function, year_of_construction, adjacency, lot_area, build_area, extrusion_height):
|
def _parse_multi_polygon(self, polygons_coordinates, building_name, building_aliases, function, year_of_construction, adjacency, extrusion_height):
|
||||||
surfaces = []
|
surfaces = []
|
||||||
for coordinates in polygons_coordinates:
|
for coordinates in polygons_coordinates:
|
||||||
for polygon_coordinates in coordinates:
|
for polygon_coordinates in coordinates:
|
||||||
@ -331,7 +317,7 @@ class Geojson:
|
|||||||
polygon = Polygon(coordinates)
|
polygon = Polygon(coordinates)
|
||||||
polygon.area = igh.ground_area(coordinates)
|
polygon.area = igh.ground_area(coordinates)
|
||||||
surfaces[-1] = Surface(polygon, polygon)
|
surfaces[-1] = Surface(polygon, polygon)
|
||||||
building = Building(f'{building_name}', surfaces, year_of_construction, function, adjacency, lot_area, build_area)
|
building = Building(f'{building_name}', surfaces, year_of_construction, function, adjacency)
|
||||||
for alias in building_aliases:
|
for alias in building_aliases:
|
||||||
building.add_alias(alias)
|
building.add_alias(alias)
|
||||||
if extrusion_height == 0:
|
if extrusion_height == 0:
|
||||||
@ -366,7 +352,7 @@ class Geojson:
|
|||||||
polygon = Polygon(wall_coordinates)
|
polygon = Polygon(wall_coordinates)
|
||||||
wall = Surface(polygon, polygon)
|
wall = Surface(polygon, polygon)
|
||||||
surfaces.append(wall)
|
surfaces.append(wall)
|
||||||
building = Building(f'{building_name}', surfaces, year_of_construction, function, adjacency, lot_area, build_area)
|
building = Building(f'{building_name}', surfaces, year_of_construction, function, adjacency)
|
||||||
for alias in building_aliases:
|
for alias in building_aliases:
|
||||||
building.add_alias(alias)
|
building.add_alias(alias)
|
||||||
building.volume = volume
|
building.volume = volume
|
||||||
|
@ -29,16 +29,12 @@ class GeometryFactory:
|
|||||||
function_field=None,
|
function_field=None,
|
||||||
function_to_hub=None,
|
function_to_hub=None,
|
||||||
adjacency_field=None,
|
adjacency_field=None,
|
||||||
build_area_field=None,
|
|
||||||
lot_area_field=None,
|
|
||||||
hub_crs=None,
|
hub_crs=None,
|
||||||
total_floor_area_field=None):
|
total_floor_area_field=None):
|
||||||
self._file_type = '_' + file_type.lower()
|
self._file_type = '_' + file_type.lower()
|
||||||
validate_import_export_type(GeometryFactory, file_type)
|
validate_import_export_type(GeometryFactory, file_type)
|
||||||
self._path = path
|
self._path = path
|
||||||
self._adjacency_field = adjacency_field
|
self._adjacency_field = adjacency_field
|
||||||
self._build_area_field = build_area_field
|
|
||||||
self._lot_area_field = lot_area_field
|
|
||||||
self._aliases_field = aliases_field
|
self._aliases_field = aliases_field
|
||||||
self._height_field = height_field
|
self._height_field = height_field
|
||||||
self._centroid_x_field = centroid_x_field
|
self._centroid_x_field = centroid_x_field
|
||||||
@ -83,8 +79,6 @@ class GeometryFactory:
|
|||||||
self._function_field,
|
self._function_field,
|
||||||
self._function_to_hub,
|
self._function_to_hub,
|
||||||
self._adjacency_field,
|
self._adjacency_field,
|
||||||
self._build_area_field,
|
|
||||||
self._lot_area_field,
|
|
||||||
self._hub_crs).city
|
self._hub_crs).city
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -49,11 +49,11 @@ class ArchetypeBasedDemand:
|
|||||||
if function in ['residential', 'multifamily house', 'single family house']:
|
if function in ['residential', 'multifamily house', 'single family house']:
|
||||||
if height < 6 and adjacency == 'detached':
|
if height < 6 and adjacency == 'detached':
|
||||||
usage = 'Single Family'
|
usage = 'Single Family'
|
||||||
elif height < 6 and ((adjacency == 'attached') | (adjacency == 'semi-detached')):
|
elif height < 6 and adjacency == 'attached':
|
||||||
usage = 'Row house'
|
usage = 'Row house'
|
||||||
elif 6 <= height <= 10 and adjacency == 'detached':
|
elif 6 <= height <= 10 and adjacency == 'detached':
|
||||||
usage = 'Duplex/triplex'
|
usage = 'Duplex/triplex'
|
||||||
elif 6 <= height <= 10 and ((adjacency == 'attached') | (adjacency == 'semi-detached')):
|
elif 6 <= height <= 10 and adjacency == 'attached':
|
||||||
usage = 'Small MURBs'
|
usage = 'Small MURBs'
|
||||||
elif 10 < height <= 15:
|
elif 10 < height <= 15:
|
||||||
usage = 'Medium MURBs'
|
usage = 'Medium MURBs'
|
||||||
@ -65,7 +65,7 @@ class ArchetypeBasedDemand:
|
|||||||
usage = 'Office'
|
usage = 'Office'
|
||||||
elif function in ['commercial', 'retail shop without refrigerated food', 'retail shop with refrigerated food',
|
elif function in ['commercial', 'retail shop without refrigerated food', 'retail shop with refrigerated food',
|
||||||
'stand alone retail', 'strip mall']:
|
'stand alone retail', 'strip mall']:
|
||||||
if (adjacency == 'attached') | (adjacency == 'semi-detached'):
|
if adjacency == 'attached':
|
||||||
usage = 'Commercial attached'
|
usage = 'Commercial attached'
|
||||||
else:
|
else:
|
||||||
usage = 'Commercial detached'
|
usage = 'Commercial detached'
|
||||||
@ -117,6 +117,7 @@ class ArchetypeBasedDemand:
|
|||||||
def enrich(self):
|
def enrich(self):
|
||||||
for building in self.city.buildings:
|
for building in self.city.buildings:
|
||||||
archetype_key = self._get_archetype_key(building)
|
archetype_key = self._get_archetype_key(building)
|
||||||
|
print(archetype_key)
|
||||||
if archetype_key and archetype_key in self.archetype_data:
|
if archetype_key and archetype_key in self.archetype_data:
|
||||||
demand = self.archetype_data[archetype_key]
|
demand = self.archetype_data[archetype_key]
|
||||||
area = building.thermal_zones_from_internal_zones[0].total_floor_area
|
area = building.thermal_zones_from_internal_zones[0].total_floor_area
|
||||||
|
78
main.py
78
main.py
@ -4,25 +4,23 @@ from hub.helpers.dictionaries import Dictionaries
|
|||||||
from hub.imports.construction_factory import ConstructionFactory
|
from hub.imports.construction_factory import ConstructionFactory
|
||||||
from hub.imports.results_factory import ResultFactory
|
from hub.imports.results_factory import ResultFactory
|
||||||
from hub.exports.exports_factory import ExportsFactory
|
from hub.exports.exports_factory import ExportsFactory
|
||||||
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from hub.imports.weather_factory import WeatherFactory
|
from hub.imports.weather_factory import WeatherFactory
|
||||||
from pv_assessment.electricity_demand_calculator import HourlyElectricityDemand
|
from pv_assessment.electricity_demand_calculator import HourlyElectricityDemand
|
||||||
from pv_assessment.pv_system_assessment import PvSystemAssessment
|
from pv_assessment.pv_system_assessment import PvSystemAssessment
|
||||||
from pv_assessment.solar_calculator import SolarCalculator
|
from pv_assessment.solar_calculator import SolarCalculator
|
||||||
import random_assignation
|
|
||||||
import subprocess
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
input_file = "data/selected_buildings.geojson"
|
input_file = "data/cmm_test_corrected.geojson"
|
||||||
demand_file = "data/energy_demand_data.csv"
|
demand_file = "data/energy_demand_data.csv"
|
||||||
|
|
||||||
# Define specific paths for outputs from SRA (Simplified Radiosity Algorith) and PV calculation processes
|
# Define specific paths for outputs from SRA (Simplified Radiosity Algorith) and PV calculation processes
|
||||||
output_path = (Path(__file__).parent.parent / 'hub/out_files').resolve()
|
output_path = (Path(__file__).parent.parent / 'out_files').resolve()
|
||||||
output_path.mkdir(parents=True, exist_ok=True)
|
output_path.mkdir(parents=True, exist_ok=True)
|
||||||
sra_output_path = output_path / 'sra_outputs'
|
sra_output_path = output_path / 'sra_outputs'
|
||||||
sra_output_path.mkdir(parents=True, exist_ok=True)
|
sra_output_path.mkdir(parents=True, exist_ok=True)
|
||||||
pv_assessment_path = output_path / 'pv_outputs'
|
pv_assessment_path = output_path / 'pv_outputs'
|
||||||
pv_assessment_path.mkdir(parents=True, exist_ok=True)
|
pv_assessment_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
city = GeometryFactory(
|
city = GeometryFactory(
|
||||||
"geojson",
|
"geojson",
|
||||||
input_file,
|
input_file,
|
||||||
@ -30,13 +28,10 @@ city = GeometryFactory(
|
|||||||
year_of_construction_field="contr_year",
|
year_of_construction_field="contr_year",
|
||||||
function_field="function_c",
|
function_field="function_c",
|
||||||
adjacency_field="adjacency",
|
adjacency_field="adjacency",
|
||||||
lot_area_field='lot_area',
|
|
||||||
build_area_field='build_area',
|
|
||||||
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
||||||
ConstructionFactory('nrcan', city).enrich()
|
ConstructionFactory('nrcan', city).enrich()
|
||||||
WeatherFactory('epw', city).enrich()
|
WeatherFactory('epw', city).enrich()
|
||||||
ResultFactory('archetypes', city, demand_file).enrich()
|
ResultFactory('archetypes', city, demand_file).enrich()
|
||||||
|
|
||||||
# Export the city data in SRA-compatible format to facilitate solar radiation assessment
|
# Export the city data in SRA-compatible format to facilitate solar radiation assessment
|
||||||
ExportsFactory('sra', city, sra_output_path).export()
|
ExportsFactory('sra', city, sra_output_path).export()
|
||||||
# Run SRA simulation using an external command, passing the generated SRA XML file path as input
|
# Run SRA simulation using an external command, passing the generated SRA XML file path as input
|
||||||
@ -44,7 +39,7 @@ sra_path = (sra_output_path / f'{city.name}_sra.xml').resolve()
|
|||||||
subprocess.run(['sra', str(sra_path)])
|
subprocess.run(['sra', str(sra_path)])
|
||||||
# Enrich city data with SRA simulation results for subsequent analysis
|
# Enrich city data with SRA simulation results for subsequent analysis
|
||||||
ResultFactory('sra', city, sra_output_path).enrich()
|
ResultFactory('sra', city, sra_output_path).enrich()
|
||||||
# Initialize solar calculation parameters (e.g., azimuth, altitude) and compute irradiance and solar angles
|
# # Initialize solar calculation parameters (e.g., azimuth, altitude) and compute irradiance and solar angles
|
||||||
tilt_angle = 37
|
tilt_angle = 37
|
||||||
solar_parameters = SolarCalculator(city=city,
|
solar_parameters = SolarCalculator(city=city,
|
||||||
surface_azimuth_angle=180,
|
surface_azimuth_angle=180,
|
||||||
@ -53,13 +48,17 @@ solar_parameters = SolarCalculator(city=city,
|
|||||||
solar_angles = solar_parameters.solar_angles # Obtain solar angles for further analysis
|
solar_angles = solar_parameters.solar_angles # Obtain solar angles for further analysis
|
||||||
solar_parameters.tilted_irradiance_calculator() # Calculate the solar radiation on a tilted surface
|
solar_parameters.tilted_irradiance_calculator() # Calculate the solar radiation on a tilted surface
|
||||||
# Assignation of Energy System Archetypes to Buildings
|
# Assignation of Energy System Archetypes to Buildings
|
||||||
random_assignation.call_random(city.buildings, random_assignation.residential_systems_percentage)
|
#TODO this needs to be modified. We should either use the existing percentages or assign systems based on building
|
||||||
|
# functions
|
||||||
|
for building in city.buildings:
|
||||||
|
building.energy_systems_archetype_name = 'Grid Tied PV System'
|
||||||
EnergySystemsFactory('montreal_future', city).enrich()
|
EnergySystemsFactory('montreal_future', city).enrich()
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
|
electricity_demand = HourlyElectricityDemand(building).calculate()
|
||||||
PvSystemAssessment(building=building,
|
PvSystemAssessment(building=building,
|
||||||
pv_system=None,
|
pv_system=None,
|
||||||
battery=None,
|
battery=None,
|
||||||
electricity_demand=None,
|
electricity_demand=electricity_demand,
|
||||||
tilt_angle=tilt_angle,
|
tilt_angle=tilt_angle,
|
||||||
solar_angles=solar_angles,
|
solar_angles=solar_angles,
|
||||||
pv_installation_type='rooftop',
|
pv_installation_type='rooftop',
|
||||||
@ -72,57 +71,4 @@ for building in city.buildings:
|
|||||||
csv_output=False,
|
csv_output=False,
|
||||||
output_path=pv_assessment_path).enrich()
|
output_path=pv_assessment_path).enrich()
|
||||||
|
|
||||||
r = []
|
|
||||||
for building in city.buildings:
|
|
||||||
r.append((building.build_area - building.lot_area) / building.thermal_zones_from_internal_zones[0].total_floor_area)
|
|
||||||
|
|
||||||
print("done")
|
print("done")
|
||||||
|
|
||||||
|
|
||||||
import geopandas as gpd
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
from matplotlib.colors import Normalize
|
|
||||||
|
|
||||||
# Load GeoJSON file
|
|
||||||
gdf = gpd.read_file(input_file)
|
|
||||||
|
|
||||||
# Extract self-sufficiency values
|
|
||||||
self_sufficiency_values = [building.self_sufficiency['year'] / 1000 for building in city.buildings]
|
|
||||||
|
|
||||||
# Add self-sufficiency values to GeoDataFrame
|
|
||||||
gdf['self_sufficiency'] = self_sufficiency_values
|
|
||||||
|
|
||||||
# Determine the color normalization range
|
|
||||||
vmin = min(0, gdf['self_sufficiency'].min()) # Include 0 if min is positive
|
|
||||||
vmax = max(0, gdf['self_sufficiency'].max()) # Include 0 if max is negative
|
|
||||||
|
|
||||||
# Set up the figure and axis
|
|
||||||
fig, ax = plt.subplots(1, 1, figsize=(14, 10))
|
|
||||||
|
|
||||||
# Define a colormap and normalize the values
|
|
||||||
cmap = plt.cm.viridis
|
|
||||||
norm = Normalize(vmin=vmin, vmax=vmax)
|
|
||||||
|
|
||||||
# Plot the GeoDataFrame
|
|
||||||
gdf.plot(column='self_sufficiency',
|
|
||||||
cmap=cmap,
|
|
||||||
linewidth=0.8,
|
|
||||||
edgecolor='grey', # Add edges for better distinction
|
|
||||||
legend=False, # Turn off the built-in legend
|
|
||||||
ax=ax)
|
|
||||||
|
|
||||||
# Add a custom colorbar
|
|
||||||
sm = plt.cm.ScalarMappable(cmap=cmap, norm=norm)
|
|
||||||
sm._A = [] # Needed for ScalarMappable with no data
|
|
||||||
cbar = fig.colorbar(sm, ax=ax, fraction=0.03, pad=0.04)
|
|
||||||
cbar.set_label('Self-Sufficiency (kWh/year)', fontsize=12)
|
|
||||||
|
|
||||||
# Add gridlines and axis labels
|
|
||||||
ax.grid(color='lightgrey', linestyle='--', linewidth=0.5, alpha=0.7)
|
|
||||||
ax.set_title('Building Self-Sufficiency Levels', fontsize=16, fontweight='bold', pad=20)
|
|
||||||
ax.set_xlabel('Longitude', fontsize=12)
|
|
||||||
ax.set_ylabel('Latitude', fontsize=12)
|
|
||||||
|
|
||||||
# Improve layout
|
|
||||||
plt.tight_layout()
|
|
||||||
plt.show()
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -5,60 +5,59 @@ class HourlyElectricityDemand:
|
|||||||
|
|
||||||
def calculate(self):
|
def calculate(self):
|
||||||
hourly_electricity_consumption = []
|
hourly_electricity_consumption = []
|
||||||
# energy_systems = self.building.energy_systems
|
energy_systems = self.building.energy_systems
|
||||||
appliance = self.building.appliances_electrical_demand[cte.HOUR] if self.building.appliances_electrical_demand else 0
|
appliance = self.building.appliances_electrical_demand[cte.HOUR] if self.building.appliances_electrical_demand else 0
|
||||||
lighting = self.building.lighting_electrical_demand[cte.HOUR] if self.building.lighting_electrical_demand else 0
|
lighting = self.building.lighting_electrical_demand[cte.HOUR] if self.building.lighting_electrical_demand else 0
|
||||||
# elec_heating = 1
|
elec_heating = 0
|
||||||
# elec_cooling = 1
|
elec_cooling = 0
|
||||||
# elec_dhw = 1
|
elec_dhw = 0
|
||||||
# if cte.HEATING in self.building.energy_consumption_breakdown[cte.ELECTRICITY]:
|
if cte.HEATING in self.building.energy_consumption_breakdown[cte.ELECTRICITY]:
|
||||||
# elec_heating = 1
|
elec_heating = 1
|
||||||
# if cte.COOLING in self.building.energy_consumption_breakdown[cte.ELECTRICITY]:
|
if cte.COOLING in self.building.energy_consumption_breakdown[cte.ELECTRICITY]:
|
||||||
# elec_cooling = 1
|
elec_cooling = 1
|
||||||
# if cte.DOMESTIC_HOT_WATER in self.building.energy_consumption_breakdown[cte.ELECTRICITY]:
|
if cte.DOMESTIC_HOT_WATER in self.building.energy_consumption_breakdown[cte.ELECTRICITY]:
|
||||||
# elec_dhw = 1
|
elec_dhw = 1
|
||||||
# heating = None
|
heating = None
|
||||||
# cooling = None
|
cooling = None
|
||||||
# dhw = None
|
dhw = None
|
||||||
|
|
||||||
# if elec_heating == 1:
|
if elec_heating == 1:
|
||||||
# for energy_system in energy_systems:
|
for energy_system in energy_systems:
|
||||||
# if cte.HEATING in energy_system.demand_types:
|
if cte.HEATING in energy_system.demand_types:
|
||||||
# for generation_system in energy_system.generation_systems:
|
for generation_system in energy_system.generation_systems:
|
||||||
# if generation_system.fuel_type == cte.ELECTRICITY:
|
if generation_system.fuel_type == cte.ELECTRICITY:
|
||||||
# if cte.HEATING in generation_system.energy_consumption:
|
if cte.HEATING in generation_system.energy_consumption:
|
||||||
# heating = generation_system.energy_consumption[cte.HEATING][cte.HOUR]
|
heating = generation_system.energy_consumption[cte.HEATING][cte.HOUR]
|
||||||
# else:
|
else:
|
||||||
# if len(energy_system.generation_systems) > 1:
|
if len(energy_system.generation_systems) > 1:
|
||||||
# heating = [x / 2 for x in self.building.heating_consumption[cte.HOUR]]
|
heating = [x / 2 for x in self.building.heating_consumption[cte.HOUR]]
|
||||||
# else:
|
else:
|
||||||
# heating = self.building.heating_consumption[cte.HOUR]
|
heating = self.building.heating_consumption[cte.HOUR]
|
||||||
heating = self.building.heating_demand[cte.HOUR] * 70
|
|
||||||
# if elec_dhw == 1:
|
if elec_dhw == 1:
|
||||||
# for energy_system in energy_systems:
|
for energy_system in energy_systems:
|
||||||
# if cte.DOMESTIC_HOT_WATER in energy_system.demand_types:
|
if cte.DOMESTIC_HOT_WATER in energy_system.demand_types:
|
||||||
# for generation_system in energy_system.generation_systems:
|
for generation_system in energy_system.generation_systems:
|
||||||
# if generation_system.fuel_type == cte.ELECTRICITY:
|
if generation_system.fuel_type == cte.ELECTRICITY:
|
||||||
# if cte.DOMESTIC_HOT_WATER in generation_system.energy_consumption:
|
if cte.DOMESTIC_HOT_WATER in generation_system.energy_consumption:
|
||||||
# dhw = generation_system.energy_consumption[cte.DOMESTIC_HOT_WATER][cte.HOUR]
|
dhw = generation_system.energy_consumption[cte.DOMESTIC_HOT_WATER][cte.HOUR]
|
||||||
# else:
|
else:
|
||||||
# if len(energy_system.generation_systems) > 1:
|
if len(energy_system.generation_systems) > 1:
|
||||||
# dhw = [x / 2 for x in self.building.domestic_hot_water_consumption[cte.HOUR]]
|
dhw = [x / 2 for x in self.building.domestic_hot_water_consumption[cte.HOUR]]
|
||||||
# else:
|
else:
|
||||||
# dhw = self.building.domestic_hot_water_consumption[cte.HOUR]
|
dhw = self.building.domestic_hot_water_consumption[cte.HOUR]
|
||||||
dhw = self.building.domestic_hot_water_heat_demand[cte.HOUR] * 70
|
|
||||||
# if elec_cooling == 1:
|
if elec_cooling == 1:
|
||||||
# for energy_system in energy_systems:
|
for energy_system in energy_systems:
|
||||||
# if cte.COOLING in energy_system.demand_types:
|
if cte.COOLING in energy_system.demand_types:
|
||||||
# for generation_system in energy_system.generation_systems:
|
for generation_system in energy_system.generation_systems:
|
||||||
# if cte.COOLING in generation_system.energy_consumption:
|
if cte.COOLING in generation_system.energy_consumption:
|
||||||
# cooling = generation_system.energy_consumption[cte.COOLING][cte.HOUR]
|
cooling = generation_system.energy_consumption[cte.COOLING][cte.HOUR]
|
||||||
# else:
|
else:
|
||||||
# if len(energy_system.generation_systems) > 1:
|
if len(energy_system.generation_systems) > 1:
|
||||||
# cooling = [x / 2 for x in self.building.cooling_consumption[cte.HOUR]]
|
cooling = [x / 2 for x in self.building.cooling_consumption[cte.HOUR]]
|
||||||
# else:
|
else:
|
||||||
# cooling = self.building.cooling_consumption[cte.HOUR]
|
cooling = self.building.cooling_consumption[cte.HOUR]
|
||||||
cooling = self.building.cooling_demand[cte.HOUR]
|
|
||||||
|
|
||||||
for i in range(8760):
|
for i in range(8760):
|
||||||
hourly = 0
|
hourly = 0
|
||||||
@ -73,5 +72,4 @@ class HourlyElectricityDemand:
|
|||||||
if dhw is not None:
|
if dhw is not None:
|
||||||
hourly += dhw[i]
|
hourly += dhw[i]
|
||||||
hourly_electricity_consumption.append(hourly)
|
hourly_electricity_consumption.append(hourly)
|
||||||
self.building.distribution_systems_electrical_consumption = hourly_electricity_consumption
|
|
||||||
return hourly_electricity_consumption
|
return hourly_electricity_consumption
|
||||||
|
@ -135,7 +135,7 @@ class PvSystemAssessment:
|
|||||||
if self.electricity_demand is not None:
|
if self.electricity_demand is not None:
|
||||||
electricity_demand = self.electricity_demand
|
electricity_demand = self.electricity_demand
|
||||||
else:
|
else:
|
||||||
electricity_demand = [demand*1000 for demand in
|
electricity_demand = [demand / cte.WATTS_HOUR_TO_JULES for demand in
|
||||||
HourlyElectricityDemand(self.building).calculate()]
|
HourlyElectricityDemand(self.building).calculate()]
|
||||||
rooftops_pv_output = [0] * len(electricity_demand)
|
rooftops_pv_output = [0] * len(electricity_demand)
|
||||||
facades_pv_output = [0] * len(electricity_demand)
|
facades_pv_output = [0] * len(electricity_demand)
|
||||||
@ -158,15 +158,13 @@ class PvSystemAssessment:
|
|||||||
total_hourly_pv_output = [rooftops_pv_output[i] + facades_pv_output[i] for i in range(8760)]
|
total_hourly_pv_output = [rooftops_pv_output[i] + facades_pv_output[i] for i in range(8760)]
|
||||||
imported_electricity = [0] * 8760
|
imported_electricity = [0] * 8760
|
||||||
exported_electricity = [0] * 8760
|
exported_electricity = [0] * 8760
|
||||||
self.building.self_sufficiency['hour'] = []
|
|
||||||
for i in range(len(electricity_demand)):
|
for i in range(len(electricity_demand)):
|
||||||
transfer = total_hourly_pv_output[i] - electricity_demand[i]
|
transfer = total_hourly_pv_output[i] - electricity_demand[i]
|
||||||
self.building.self_sufficiency['hour'].append(transfer)
|
|
||||||
if transfer > 0:
|
if transfer > 0:
|
||||||
exported_electricity[i] = transfer
|
exported_electricity[i] = transfer
|
||||||
else:
|
else:
|
||||||
imported_electricity[i] = abs(transfer)
|
imported_electricity[i] = abs(transfer)
|
||||||
self.building.self_sufficiency['year'] = sum(self.building.self_sufficiency['hour'])
|
|
||||||
results = {'building_name': self.building.name,
|
results = {'building_name': self.building.name,
|
||||||
'total_floor_area_m2': self.building.thermal_zones_from_internal_zones[0].total_floor_area,
|
'total_floor_area_m2': self.building.thermal_zones_from_internal_zones[0].total_floor_area,
|
||||||
'roof_area_m2': self.building.roofs[0].perimeter_area, 'rooftop_panels': rooftop_number_of_panels,
|
'roof_area_m2': self.building.roofs[0].perimeter_area, 'rooftop_panels': rooftop_number_of_panels,
|
||||||
|
@ -16,7 +16,7 @@ energy_systems_format = 'montreal_future'
|
|||||||
|
|
||||||
# parameters:
|
# parameters:
|
||||||
residential_systems_percentage = {
|
residential_systems_percentage = {
|
||||||
'Central Hydronic Air and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV': 0,
|
'Central Hydronic Air and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV': 100,
|
||||||
'Central Hydronic Air and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV': 0,
|
'Central Hydronic Air and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV': 0,
|
||||||
'Central Hydronic Ground and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV': 0,
|
'Central Hydronic Ground and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV': 0,
|
||||||
'Central Hydronic Ground and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW '
|
'Central Hydronic Ground and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW '
|
||||||
@ -30,27 +30,27 @@ residential_systems_percentage = {
|
|||||||
'Central Hydronic Ground and Electricity Source Heating System with Unitary Split and Air Source HP DHW': 0,
|
'Central Hydronic Ground and Electricity Source Heating System with Unitary Split and Air Source HP DHW': 0,
|
||||||
'Central Hydronic Water and Gas Source Heating System with Unitary Split and Air Source HP DHW': 0,
|
'Central Hydronic Water and Gas Source Heating System with Unitary Split and Air Source HP DHW': 0,
|
||||||
'Central Hydronic Water and Electricity Source Heating System with Unitary Split and Air Source HP DHW': 0,
|
'Central Hydronic Water and Electricity Source Heating System with Unitary Split and Air Source HP DHW': 0,
|
||||||
'Grid Tied PV System': 10,
|
'Grid Tied PV System': 0,
|
||||||
'system 1 gas': 0,
|
'system 1 gas': 0,
|
||||||
'system 1 gas grid tied pv': 5,
|
'system 1 gas grid tied pv': 0,
|
||||||
'system 1 electricity': 0,
|
'system 1 electricity': 0,
|
||||||
'system 1 electricity grid tied pv': 10,
|
'system 1 electricity grid tied pv': 0,
|
||||||
'system 2 gas': 0,
|
'system 2 gas': 0,
|
||||||
'system 2 gas grid tied pv': 10,
|
'system 2 gas grid tied pv': 0,
|
||||||
'system 2 electricity': 0,
|
'system 2 electricity': 0,
|
||||||
'system 2 electricity grid tied pv': 10,
|
'system 2 electricity grid tied pv': 0,
|
||||||
'system 3 and 4 gas': 0,
|
'system 3 and 4 gas': 0,
|
||||||
'system 3 and 4 gas grid tied pv': 10,
|
'system 3 and 4 gas grid tied pv': 0,
|
||||||
'system 3 and 4 electricity': 0,
|
'system 3 and 4 electricity': 0,
|
||||||
'system 3 and 4 electricity grid tied pv': 5,
|
'system 3 and 4 electricity grid tied pv': 0,
|
||||||
'system 6 gas': 0,
|
'system 6 gas': 0,
|
||||||
'system 6 gas grid tied pv': 10,
|
'system 6 gas grid tied pv': 0,
|
||||||
'system 6 electricity': 0,
|
'system 6 electricity': 0,
|
||||||
'system 6 electricity grid tied pv': 10,
|
'system 6 electricity grid tied pv': 0,
|
||||||
'system 8 gas': 0,
|
'system 8 gas': 0,
|
||||||
'system 8 gas grid tied pv': 10,
|
'system 8 gas grid tied pv': 0,
|
||||||
'system 8 electricity': 0,
|
'system 8 electricity': 0,
|
||||||
'system 8 electricity grid tied pv': 10,
|
'system 8 electricity grid tied pv': 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
non_residential_systems_percentage = {'system 1 gas': 0,
|
non_residential_systems_percentage = {'system 1 gas': 0,
|
||||||
@ -102,9 +102,8 @@ def _retrieve_buildings(path, year_of_construction_field=None,
|
|||||||
def call_random(_buildings: [Building], _systems_percentage):
|
def call_random(_buildings: [Building], _systems_percentage):
|
||||||
_buildings_with_systems = []
|
_buildings_with_systems = []
|
||||||
_systems_distribution = []
|
_systems_distribution = []
|
||||||
_selected_buildings = list(range(len(_buildings)))
|
_selected_buildings = list(range(0, len(_buildings)))
|
||||||
random.shuffle(_selected_buildings)
|
random.shuffle(_selected_buildings)
|
||||||
|
|
||||||
total = 0
|
total = 0
|
||||||
maximum = 0
|
maximum = 0
|
||||||
add_to = 0
|
add_to = 0
|
||||||
@ -117,24 +116,14 @@ def call_random(_buildings: [Building], _systems_percentage):
|
|||||||
maximum = number_of_buildings
|
maximum = number_of_buildings
|
||||||
add_to = len(_systems_distribution) - 1
|
add_to = len(_systems_distribution) - 1
|
||||||
total += number_of_buildings
|
total += number_of_buildings
|
||||||
|
missing = 0
|
||||||
missing = len(_selected_buildings) - total
|
if total != len(_selected_buildings):
|
||||||
if missing > 0:
|
missing = len(_selected_buildings) - total
|
||||||
|
if missing != 0:
|
||||||
_systems_distribution[add_to]['number_of_buildings'] += missing
|
_systems_distribution[add_to]['number_of_buildings'] += missing
|
||||||
elif missing < 0:
|
|
||||||
for case in sorted(_systems_distribution, key=lambda x: -x['number_of_buildings']):
|
|
||||||
if case['number_of_buildings'] > 0:
|
|
||||||
reduce_by = min(-missing, case['number_of_buildings'])
|
|
||||||
case['number_of_buildings'] -= reduce_by
|
|
||||||
missing += reduce_by
|
|
||||||
if missing == 0:
|
|
||||||
break
|
|
||||||
total = sum(case['number_of_buildings'] for case in _systems_distribution)
|
|
||||||
assert total == len(_selected_buildings), f"Final total {total} does not match available {len(_selected_buildings)}"
|
|
||||||
|
|
||||||
_position = 0
|
_position = 0
|
||||||
for case in _systems_distribution:
|
for case in _systems_distribution:
|
||||||
for _ in range(case['number_of_buildings']):
|
for i in range(0, case['number_of_buildings']):
|
||||||
_buildings[_selected_buildings[_position]].energy_systems_archetype_name = case['system']
|
_buildings[_selected_buildings[_position]].energy_systems_archetype_name = case['system']
|
||||||
_position += 1
|
_position += 1
|
||||||
return _buildings
|
return _buildings
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
import geopandas as gpd
|
|
||||||
from shapely.geometry import Polygon
|
|
||||||
|
|
||||||
points = [
|
|
||||||
(-73.65522099550455, 45.47216648812992),
|
|
||||||
(-73.65201191054271, 45.47096942503966),
|
|
||||||
(-73.65299060423152, 45.46955428052838),
|
|
||||||
(-73.65532718525228, 45.47041615556808),
|
|
||||||
(-73.65522099550455, 45.47216648812992)
|
|
||||||
]
|
|
||||||
|
|
||||||
bounding_polygon = Polygon(points)
|
|
||||||
|
|
||||||
geojson_path = './data/cerc_cmm_corrected.geojson'
|
|
||||||
gdf = gpd.read_file(geojson_path)
|
|
||||||
|
|
||||||
filtered_gdf = gdf[gdf.intersects(bounding_polygon)]
|
|
||||||
|
|
||||||
filtered_gdf.to_file("./data/selected_buildings.geojson", driver="GeoJSON")
|
|
Loading…
Reference in New Issue
Block a user