# -*- coding: utf-8 -*-
import os

root = os.path.dirname(os.path.abspath(__file__))

# SDE
SDE = {
    "JCPT": os.path.join(root, r"sde\JCPT.sde"),
    "KJGH": os.path.join(root, r"sde\KJGH.sde"),
    "KJGH_QY": os.path.join(root, r"sde\KJGH_QY.sde"),
    "KJGH_JCPT": os.path.join(root, r"sde\KJGH_JCPT.sde"),
    "SDE": os.path.join(root, r"sde\SDE.sde")
}

# 数据库
# DB_CONN = 'KJGH/KJGH@127.0.0.1:1521/orclpdb'
# DB_CONN = 'postgres/postgres@192.168.60.52:5432/basep'
#DB_CONN = 'dbname=basep user=postgres password=postgres host=192.168.60.52 port=5432 search_path=onemap'
DB_CONN = {"dbname": "kjgh", "user": "postgres", "password": "postgres", "host": "192.168.60.240", "port": "5432",
           "options": "-c search_path=otherSchema,onemap"}

# 行政区
XZQ = [
    {"xzqbm": "", "xzqmc": ""}
]


# 获取SDE工作空间
def getSDE(in_table):
    sdeTable = in_table.split('.')
    sde = SDE[sdeTable[0]]
    return sde
