2024-10-03 18:28:35 -04:00
|
|
|
from hub.imports.geometry_factory import GeometryFactory
|
|
|
|
from hub.helpers.dictionaries import Dictionaries
|
|
|
|
import os
|
|
|
|
import psycopg2
|
2024-10-08 15:07:32 -04:00
|
|
|
import csv
|
2024-10-03 18:28:35 -04:00
|
|
|
|
2024-10-08 15:07:32 -04:00
|
|
|
input_file = "data/cmm_points_function_vintage_surface.csv"
|
2024-10-03 18:28:35 -04:00
|
|
|
|
2024-10-08 15:07:32 -04:00
|
|
|
# Initialize city object from GeometryFactory
|
2024-10-03 18:28:35 -04:00
|
|
|
city = GeometryFactory(
|
|
|
|
file_type="csv",
|
|
|
|
path=input_file,
|
2024-10-08 15:07:32 -04:00
|
|
|
centroid_x_field="centroid_x",
|
|
|
|
centroid_y_field="centroid_y",
|
2024-10-03 18:28:35 -04:00
|
|
|
year_of_construction_field="anne_cnstr",
|
|
|
|
function_field="code_util",
|
|
|
|
function_to_hub=Dictionaries().montreal_function_to_hub_function,
|
|
|
|
total_floor_area_field="supfi_etag"
|
|
|
|
).city
|