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

Adjustments to refactoring (minor)

parent 8b9acad1
......@@ -86,17 +86,19 @@ def run_this_file(config_dict):
cell_id, adm_level, admin_id, area_intersect, geom_intersect, cases_in_lev_grs, shp_not_found = result
# Write entry to database:
err_msg = gdet_psql.insert_data_in_cell_admin_unit_mapping(DB_name_grid,
DB_username_grid,
DB_schema_name_grid,
DB_table_name_grid,
cell_id,
country_name,
adm_level,
admin_id,
area_intersect,
geom_intersect,
cases_in_lev_grs)
err_msg = gdet_psql.insert_data_in_cell_admin_unit_mapping(
DB_name_grid,
DB_username_grid,
DB_schema_name_grid,
DB_table_name_grid,
cell_id,
country_name,
adm_level,
admin_id,
area_intersect,
geom_intersect,
cases_in_lev_grs)
if len(err_msg)>0:
logger.info(country_name+': '+err_msg)
logger.debug('\r %s' % (gdet_gral.add_to_log_shapefiles_found(country_name,
......@@ -169,7 +171,7 @@ def process_country(country_str, country_pos, number_countries,
for results_adm in process_admin_unit(adm_boundary, which_row, logger):
cell_id, area_intersect, geom_intersect = results_adm
yield cell_id, level_groups_levels[j], admin_id, area_intersect, geom_intersect, level_groups[j], shp_not_found
print('\n')
print('\n')
def process_admin_unit(adm_boundary_gdf, which_row_of_gdf, logger):
"""
......
Supports Markdown
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