GISHydroNXT System Documentation
#*********************************************************************************
# Author: UMD
# Date: 24-07-2018
# Modified: n/a
# Classes: AddOutlets()
# Functions: n/a
# Modules: arcpy
# Comments: n/a
#*********************************************************************************
class AddOutlets(object):
"""Implementation for GISHydroNXT_addin.button7 (Button)"""
def __init__(self):
self.enabled = False
self.checked = False
def onClick(self):
arcpy.env.scratchWorkspace = scratchfolder
arcpy.env.workspace = optfolder
#*******************************************************************************************************
# process "AddOutlets" raster to handle NoData values -- as it has to be added to "outlets" later
#*******************************************************************************************************
arcpy.PointToRaster_conversion(optfolder + "/AddasOutlets.shp","FID",optfolder + "/Outlets_temp","MOST_FREQUENT","NONE",30)
outlets_adj = arcpy.sa.Plus(optfolder + "/Outlets_temp",1)
outlets_adj.save(optfolder + "/AddOutlets")
outlets_custom = arcpy.sa.Con(arcpy.sa.IsNull(optfolder + "/AddOutlets"), 0, optfolder + "/AddOutlets")
outlets_custom.save(optfolder + "/outlets_user")
#*******************************************************************************************************
# Turn Add streams OFF and Delineate Subwatersheds ON
#*******************************************************************************************************
tool5.enabled = False
button6.enabled = False
button7.enabled = False