Commit 0d7965c6 authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Forced variable types in OBM_buildings_per_cell.py

parent 89638274
......@@ -85,7 +85,7 @@ def run_this_file(config_dict):
####################################################
log= [] # list that I fill in for logging purposes and then dump to a txt file
for i, grid_cell_id in enumerate(grid_cells_list):
if grid_cell_id>min_grid_cell_id:
if int(grid_cell_id) > min_grid_cell_id:
print('\r Working on cell ID '+str(grid_cell_id)+'. Cell '+str(i+1)+' of '+str(len(grid_cells_list))+'.', end='')
bdgs_df_i= gdet_psql.retrieve_parameters_of_buildings_in_cell_as_pandas(DB_name_bdgs, DB_username_bdgs, DB_schema_name_bdgs, DB_table_name_bdgs, grid_cell_id, parameter_names=['osm_id', 'gem_occupancy', 'building_levels', 'way_area', 'country_iso2', 'res_adm_id', 'res_adm_level', 'com_adm_id', 'com_adm_level', 'ind_adm_id', 'ind_adm_level'], get_centroid_coords=True)
bdgs_df_i= bdgs_df_i.rename(columns={'way_area': 'area', 'ST_X(ST_Transform(ST_Centroid(way),4326))': 'lon', 'ST_Y(ST_Transform(ST_Centroid(way),4326))': 'lat'})
......
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