source: anuga_work/production/perth/Arc_txt2feature_class_runup.py @ 6540

Last change on this file since 6540 was 6392, checked in by kristy, 16 years ago

add arc scripts to convert outcomes to points

File size: 2.6 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
18scenario_dir="\\\\nas2\\gemd\\georisk_models\\inundation\\data\\western_australia\\perth_tsunami_scenario\\"
19output_dir = "anuga\\outputs\\"
20
21time_dir1 = '20081031_133353_run_final_0.6_68693_alpha0.1_kvanputt'
22time_dir2 = '20081031_133511_run_final_0_68693_alpha0.1_kvanputt'
23time_dir3 = '20081031_133624_run_final_0_27255_alpha0.1_kvanputt'
24time_dir4 = '20081031_133735_run_final_0.6_27255_alpha0.1_kvanputt'
25time_dir5 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt'
26time_dir6 = '20081031_133925_run_final_0.6_27283_alpha0.1_kvanputt'
27
28
29time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
30
31for time_dir in time_dirs:
32
33    # Local variables...
34    folder =  scenario_dir + output_dir + time_dir + '\\'
35    input_dir_name = folder+'perth_runup.csv'
36    raster_gdb = folder + "raster.gdb"
37    layer = 'layer'
38 
39    print 'Process: Make XY Event Layer'
40    gp.MakeXYEventLayer_management(input_dir_name, "x", "y", layer, "PROJCS['GDA_1994_MGA_Zone_50',GEOGCS['GCS_GDA_1994',DATUM"
41                                   "['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT"
42                                   "['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting'"
43                                   ",500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',117.0],PARAMETER"
44                                   "['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]];IsHighPrecision")
45
46    print 'Process: Feature Class to Feature Class'
47    gp.FeatureClassToFeatureClass_conversion(layer, raster_gdb, "perth_runup", "", "area area true true false 255 Text 0 0 ,First,#,perth_runup.csv_Features,area,-1,-1;q q true true false 8 Double 0 0 ,First,#,perth_runup.csv_Features,q,-1,-1;x x true true false 8 Double 0 0 ,First,#,perth_runup.csv_Features,x,-1,-1;y y true true false 8 Double 0 0 ,First,#,perth_runup.csv_Features,y,-1,-1", "")
48
49
50 
Note: See TracBrowser for help on using the repository browser.