from Fishnet import *
import time

timeS = time.clock()

#Enter Fishnet Model Parameters

"""
#KS Ogallala Clean Model
Workspace = 'C:/Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/Fishnet/Fishnet/KS' #This is where the fishnet folder and Geodatabase will be created
GIS_Folder = 'C:/Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/New Folder/KSClean/1000/GIS/'  #Folder containing rasters to be used in fishnet
#"""
#High Plains Clean Model
"""
Workspace = 'C:/Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/Fishnet/Fishnet/HighPlains' #This is where the fishnet folder and Geodatabase will be created
GIS_Folder = 'C:/Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/New Folder/HighPlainsClean/1000/GIS/'  #Folder containing rasters to be used in fishnet
#"""
#KS Ogallala Enhanced Bedrock Model
#"""
Workspace = 'C:/Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/Fishnet/Fishnet/KS_Enhanced' #This is where the fishnet folder and Geodatabase will be created
GIS_Folder = 'C:/Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/New Folder/KSCleanEBedrock/1000/GIS/'  #Folder containing rasters to be used in fishnet
#"""

file_list = ['slp_bse_bound','bedrock_m','k_md','pred_wlv_m','recharge_md','dem'] #Names of the rasters in the workspace to be used in creation of fishnets
file_list = ['slp_bse_bound','bedrock_m','k_md','pred_wlv_m','recharge_md','onearcsec'] #Names of the rasters in the workspace to be used in creation of fishnets
Poly_Names = ['Boundary','Bedrock','K','PredWlv','Recharge','SurfaceElev'] #names of polygons to be created, must be in same order as file_list
Cell_Width = 1000
Cell_Height = 5000


onearcsecFolder = 'C:/Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/New Folder/KSClean/1000/GIS/'  #Folder containing rasters to be used in fishnet
    

i=0
for item in file_list:
    if item == 'onearcsec':
        file_list[i]=onearcsecFolder+item
        i=i+1
    else:
        file_list[i]=GIS_Folder+item
        i=i+1

GDB_Name = str(Cell_Width) + 'X' + str(Cell_Height)

Fishnet(file_list,Workspace,GDB_Name,Poly_Names,Cell_Width,Cell_Height)

timeF = time.clock()
print "Simulation Time =",(timeF-timeS)/60,"minutes"