|
import arcpy
import numpy as np
arcpy.env.overwriteOutput = True
# 输入表面
in_surface = arcpy.GetParameterAsText(0)
# 起始高程
start = float(arcpy.GetParameterAsText(1))
# 终止高程
to = float(arcpy.GetParameterAsText(2))
# 增量
increment = float(arcpy.GetParameterAsText(3))
# 输出文本
out_text_file = arcpy.GetParameterAsText(4)
for base_z in np.arange(start=start, stop=to+increment, step=increment):
arcpy.SurfaceVolume_3d(in_surface, out_text_file, 'BELOW', base_z, 1)
arcpy.AddMessage("{}库容计算完成".format(base_z))
——-——————————————————————————————————————————————————————
# 死水位
SSW = float(arcpy.GetParameterAsText(5))
arcpy.SurfaceVolume_3d(in_surface, out_text_file, 'BELOW',SSW, 1)
# 汛限水位
XXSW= float(arcpy.GetParameterAsText(6))
arcpy.SurfaceVolume_3d(in_surface, out_text_file, 'BELOW',XXSW, 1)
# 兴利水位
XLSW= float(arcpy.GetParameterAsText(7))
arcpy.SurfaceVolume_3d(in_surface, out_text_file, 'BELOW',XLSW, 1)
# 设计洪水位
SJHSW= float(arcpy.GetParameterAsText(8))
arcpy.SurfaceVolume_3d(in_surface, out_text_file, 'BELOW',SJHSW, 1)
# 校核洪水位
JHHSW= float(arcpy.GetParameterAsText(9))
arcpy.SurfaceVolume_3d(in_surface, out_text_file, 'BELOW',JHHSW, 1) |
|