# -*- coding: utf-8 -*-
"""
Created on Mon Aug 22 15:39:09 2022

@author: cholen
"""

from fews_tools import fews_tools_config as config
from fews_tools.region_model import RegionModel

# workspace_path = r"C:\temp\GeoCLIM"
# regions_table_name = 'Regions'
reg_dic = None

reg_info = RegionModel()
reg_list = reg_info.get_all_region_names(config.EXAMPLE_DB_FILE)
all_reg_dic = {}

for entry in reg_list:
    # print(entry)
    reg_info.query_named_region(entry, config.EXAMPLE_DB_FILE)  # this fills in the reg_dic
    reg_dic = reg_info.get_region_dictionary()
    all_reg_dic[entry] = reg_dic
print(str(all_reg_dic))
