Commit aab93a84 authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Fixed bug: two different tables needed in OBM tiles in config file

parent 2c36ea30
......@@ -314,9 +314,13 @@ def check_parameters(config, section_name):
):
raise IOError("ERROR!! obm_tiles_db_username PARAMETER MISSING FROM CONFIG FILE!!")
if not config.has_option(
"OBM tiles", "obm_tiles_db_table"
"OBM tiles", "obm_tiles_db_table_built_up"
):
raise IOError("ERROR!! obm_tiles_db_table PARAMETER MISSING FROM CONFIG FILE!!")
raise IOError("ERROR!! obm_tiles_db_table_built_up PARAMETER MISSING FROM CONFIG FILE!!")
if not config.has_option(
"OBM tiles", "obm_tiles_db_table_completeness"
):
raise IOError("ERROR!! obm_tiles_db_table_completeness PARAMETER MISSING FROM CONFIG FILE!!")
if not config.has_option(
"OBM tiles", "obm_tiles_source_built_up_id"
):
......
......@@ -68,7 +68,8 @@ db_admin_table_name = DB_TABLE_NAME
obm_tiles_db_hostname = SERVER_NAME
obm_tiles_db_name = DB_NAME
obm_tiles_db_username = DB_USERNAME
obm_tiles_db_table = DB_TABLE_NAME
obm_tiles_db_table_built_up = DB_TABLE_NAME_BUILT_UP
obm_tiles_db_table_completeness = DB_TABLE_NAME_COMPLETENESS
# Source ID for built-up area to retrieve:
obm_tiles_source_built_up_id = 1
......
......@@ -69,7 +69,7 @@ def run_this_file(config_dict):
obm_tiles_db_hostname = config_dict['OBM tiles']['obm_tiles_db_hostname']
obm_tiles_db_name = config_dict['OBM tiles']['obm_tiles_db_name']
obm_tiles_db_username = config_dict['OBM tiles']['obm_tiles_db_username']
obm_tiles_db_table = config_dict['OBM tiles']['obm_tiles_db_table']
obm_tiles_db_table = config_dict['OBM tiles']['obm_tiles_db_table_completeness']
# Case of SERA disaggregation to consider (['area', 'gpw_2015_pop', 'ghs', 'sat_27f', 'sat_27f_model']):
sera_disaggregation_to_consider= config_dict['GDE_gather_SERA_and_OBM']['sera_disaggregation_to_consider']
# Select whether to print to screen intermediate values or not (useful for debugging):
......
......@@ -53,7 +53,7 @@ def run_this_file(config_dict):
obm_tiles_db_hostname = config_dict['OBM tiles']['obm_tiles_db_hostname']
obm_tiles_db_name = config_dict['OBM tiles']['obm_tiles_db_name']
obm_tiles_db_username = config_dict['OBM tiles']['obm_tiles_db_username']
obm_tiles_db_table = config_dict['OBM tiles']['obm_tiles_db_table']
obm_tiles_db_table = config_dict['OBM tiles']['obm_tiles_db_table_built_up']
obm_tiles_source_id = int(config_dict['OBM tiles']['obm_tiles_source_built_up_id'])
# Tiles database:
DB_username_grid = config_dict['Tiles Database']['db_tiles_username']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment