Skip to content
Snippets Groups Projects

Added tests for building information retrieval methods.

4 files
+ 199
51
Compare changes
  • Side-by-side
  • Inline

Files

+ 30
30
@@ -511,8 +511,8 @@ list_labels_bbr = [
@@ -511,8 +511,8 @@ list_labels_bbr = [
label_bbr_extra_heating
label_bbr_extra_heating
]
]
#******************************************************************************
# *****************************************************************************
#******************************************************************************
# *****************************************************************************
def get_bbr_building_data_geodataframe(
def get_bbr_building_data_geodataframe(
building_entrance_ids: list,
building_entrance_ids: list,
@@ -521,8 +521,8 @@ def get_bbr_building_data_geodataframe(
@@ -521,8 +521,8 @@ def get_bbr_building_data_geodataframe(
selected_bbr_building_point_labels: list = SELECT_BBR_BDG_POINT_LABELS
selected_bbr_building_point_labels: list = SELECT_BBR_BDG_POINT_LABELS
) -> Tuple[GeoDataFrame,list]:
) -> Tuple[GeoDataFrame,list]:
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
# get data about building entrances
# get data about building entrances
@@ -548,8 +548,8 @@ def get_bbr_building_data_geodataframe(
@@ -548,8 +548,8 @@ def get_bbr_building_data_geodataframe(
index=dict_building_entrances.keys()
index=dict_building_entrances.keys()
)
)
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
# get data about buildings
# get data about buildings
@@ -577,8 +577,8 @@ def get_bbr_building_data_geodataframe(
@@ -577,8 +577,8 @@ def get_bbr_building_data_geodataframe(
index=dict_buildings.keys()
index=dict_buildings.keys()
)
)
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
# get building point data
# get building point data
@@ -626,8 +626,8 @@ def get_bbr_building_data_geodataframe(
@@ -626,8 +626,8 @@ def get_bbr_building_data_geodataframe(
left_index=True,
left_index=True,
suffixes=(None,"_y")) # adds "_y" to duplicate columns
suffixes=(None,"_y")) # adds "_y" to duplicate columns
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
# create a geodataframe whose geometry is that of building points
# create a geodataframe whose geometry is that of building points
@@ -671,17 +671,17 @@ def get_bbr_building_data_geodataframe(
@@ -671,17 +671,17 @@ def get_bbr_building_data_geodataframe(
return gdf_buildings, list_failures
return gdf_buildings, list_failures
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
#******************************************************************************
# *****************************************************************************
#******************************************************************************
# *****************************************************************************
def fetch_building_entrance_data(building_entrance_ids: list) -> Tuple[dict,
def fetch_building_entrance_data(building_entrance_ids: list) -> Tuple[dict,
list]:
list]:
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
# retrieve data about each node identified through OSM
# retrieve data about each node identified through OSM
@@ -733,21 +733,21 @@ def fetch_building_entrance_data(building_entrance_ids: list) -> Tuple[dict,
@@ -733,21 +733,21 @@ def fetch_building_entrance_data(building_entrance_ids: list) -> Tuple[dict,
response.close()
response.close()
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
return dict_building_entrances, list_failures
return dict_building_entrances, list_failures
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
#******************************************************************************
# *****************************************************************************
#******************************************************************************
# *****************************************************************************
def fetch_building_data(building_codes: list):
def fetch_building_data(building_codes: list):
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
# get data about each specific building
# get data about each specific building
@@ -781,13 +781,13 @@ def fetch_building_data(building_codes: list):
@@ -781,13 +781,13 @@ def fetch_building_data(building_codes: list):
response.close()
response.close()
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
return dict_buildings
return dict_buildings
#**************************************************************************
# *************************************************************************
#**************************************************************************
# *************************************************************************
#******************************************************************************
# *****************************************************************************
#******************************************************************************
# *****************************************************************************
\ No newline at end of file
\ No newline at end of file
Loading