Changeset 5943
- Timestamp:
- Nov 12, 2008, 11:20:44 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth/asc2raster_GDA94z50.py
r5928 r5943 16 16 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx") 17 17 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx") 18 gp.overwriteoutput = 1 18 19 19 20 output_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\western_australia\\" 21 scenario_dir="perth_tsunami_scenario\\anuga\\outputs\\" 20 22 21 ##Perth 22 scenario_dir="perth_tsunami_scenario\\anuga\\outputs\\" 23 23 24 time_dir1 = '20081031_133353_run_final_0.6_68693_alpha0.1_kvanputt' 24 25 time_dir2 = '20081031_133511_run_final_0_68693_alpha0.1_kvanputt' … … 34 35 35 36 # Local variables... 36 folder = output_dir + scenario_dir + time_dir 37 raster_gbd = output_dir + scenario_dir + time_dir + 'raster.gdb'37 folder = output_dir + scenario_dir + time_dir + '\\' 38 raster_gbd = folder + 'raster.gdb' 38 39 39 40 # Process: Create File GDB... 40 gp.CreateFileGDB_management( time_dir, "raster")41 gp.CreateFileGDB_management(folder, "raster") 41 42 42 43 gp.Workspace = raster_gbd 43 44 45 #print gp.Workspace 46 44 47 #replication dictionary 45 replicate = (('perth', ''),('Geordie', 'Geo'),('Sorrento', 'Sor'), 46 ('Fremantle', 'Fre'),('Rockingham', 'Rock'), 47 ('time_39900_0', 'b'), ('time_79800_0', 'c'), ('_', '')) 48 replicate = (('perth', ''),('time_39900_0', 'b'), ('time_79800_0', 'c'), 49 ('_', ''),('Geordie', 'Geo'),('Sorrento', 'Sor'), 50 ('Fremantle', 'Fre'),('Rockingham', 'Roc'),('depth','_depth'), 51 ('speed', '_speed'), ('elevation', '_elev_'), ('stage','_stage')) 48 52 49 53 generate_filename = [] 50 input_ascii = glob.glob(folder + '* .asc')54 input_ascii = glob.glob(folder + '*max.asc') 51 55 52 56 for infile in input_ascii: … … 60 64 generate_filename.append(output_DEM) 61 65 66 #print 'input %s and output %s' %(infile,output_DEM) 67 62 68 # Process: ASCII to Raster (4)... 63 69 gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT") … … 69 75 70 76 77
Note: See TracChangeset
for help on using the changeset viewer.