source: anuga_work/production/mandurah_storm_surge_2009/Arc_txt2feature_class_runup.py @ 7614

Last change on this file since 7614 was 7614, checked in by fountain, 13 years ago

mandurah storm surge modelling

File size: 2.8 KB
Line 
1# ---------------------------------------------------------------------------
2# txt2fc_field.py
3# Created on: Thu Nov 27 2008 01:48:26 PM
4#   (generated by ArcGIS/ModelBuilder)
5# ---------------------------------------------------------------------------
6
7# Import system modules
8import sys, string, os, arcgisscripting, glob, os.path
9
10# Create the Geoprocessor object
11gp = arcgisscripting.create()
12
13# Load required toolboxes...
14gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
15gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
16gp.overwriteoutput = 1
17
18model = 'hobart'
19scenario_folder="\\\\nas2\\gemd\\georisk_models\\inundation\\data\\tasmania\\" + model + "_tsunami_scenario_2009\\"
20output_folder = "anuga\\outputs\\"
21
22time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt'
23time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt'
24time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt'
25time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt'
26time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt'
27time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'
28
29time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
30
31for time_dir in time_dirs:
32    print time_dir
33    # Local variables...
34    folder =  scenario_folder + output_folder + time_dir + '\\'
35    runup = model + '_runup'
36    input_dir_name = folder+ runup +'.csv'
37    raster = folder + "raster.gdb"
38    layer = 'layer'
39
40##    print 'Process: Create File GDB'
41##    gp.CreateFileGDB_management(folder, "raster")
42
43    print 'Process: Make XY Event Layer'
44    gp.MakeXYEventLayer_management(input_dir_name, "x", "y", layer, "PROJCS['GDA_1994_MGA_Zone_49',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994'"
45                                       ",SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0]"
46                                       ",UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator']"
47                                       ",PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0]"
48                                       ",PARAMETER['Central_Meridian',111.0],PARAMETER['Scale_Factor',0.9996]"
49                                       ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
50
51    print 'Process: Feature Class to Feature Class'
52    gp.FeatureClassToFeatureClass_conversion(layer, raster, runup, "", "area area true true false 255 Text 0 0 ,First,#,carnarvon_runup.csv_Features,area,-1,-1;q q true true false 8 Double 0 0 ,First,#,carnarvon_runup.csv_Features,q,-1,-1;x x true true false 8 Double 0 0 ,First,#,carnarvon_runup.csv_Features,x,-1,-1;y y true true false 8 Double 0 0 ,First,#,carnarvon_runup.csv_Features,y,-1,-1", "")
53
54
55 
Note: See TracBrowser for help on using the repository browser.