GISHydroNXT System Documentation
#*********************************************************************************
# Author: UMD
# Date: 24-07-2018
# Modified: n/a
# Classes: SetTcParameters()
# Functions: n/a
# Modules: arcpy
# Comments: n/a
#*********************************************************************************
class SetTcParameters(object):
"""Implementation for GISHydroNXT_addin.button9 (Button)"""
def __init__(self):
self.enabled = False
self.checked = False
def onClick(self):
#*******************************************************************************************************
# Hydraulic coefficients for channel geometry -- default to outlet"s physiographic province
#*******************************************************************************************************
a = [13.87, 14.78, 10.3]
b = [0.44, 0.39, 0.38]
c = [0.95, 1.18, 1.01]
d = [0.31, 0.34, 0.32]
e = [13.17, 17.42, 10.34]
f = [0.75, 0.73, 0.70]
theVTab = optfolder + "/theVTab.dbf"
theVTab = arcpy.SearchCursor("theVTab","","","Province","")
for row in theVTab:
if row.getValue("Province") == "A":
Coef_W = a[0]
Exp_W = b[0]
Coef_D = c[0]
Exp_D = d[0]
Coef_A = e[0]
Exp_A = f[0]
elif row.getValue("Province") == "B":
Coef_W = a[0]
Exp_W = b[0]
Coef_D = c[0]
Exp_D = d[0]
Coef_A = e[0]
Exp_A = f[0]
elif row.getValue("Province") == "P":
Coef_W = a[1]
Exp_W = b[1]
Coef_D = c[1]
Exp_D = d[1]
Coef_A = e[1]
Exp_A = f[1]
elif row.getValue("Province") == "W":
Coef_W = a[2]
Exp_W = b[2]
Coef_D = c[2]
Exp_D = d[2]
Coef_A = e[2]
Exp_A = f[2]
elif row.getValue("Province") == "E":
Coef_W = a[2]
Exp_W = b[2]
Coef_D = c[2]
Exp_D = d[2]
Coef_A = e[2]
Exp_A = f[2]
del row
# Hydraulic Coefficients -- declared globally to default in TcFrame
global a_w
a_w = Coef_W
global b_w
b_w = Exp_W
global c_d
c_d = Coef_D
global d_d
d_d = Exp_D
global e_a
e_a = Coef_A
global f_a
f_a = Exp_A
# TcFrame dialog box
dlg3 = TcFrame()