source: anuga_work/production/busselton/Arc_txt2feature_class_res.py @ 6399

Last change on this file since 6399 was 6201, checked in by kristy, 15 years ago

Updating scripts

File size: 3.2 KB
Line 
1# ---------------------------------------------------------------------------
2# txt2fc_res.py
3# Created on: Mon Dec 01 2008 11:36:17 AM
4#   (generated by ArcGIS/ModelBuilder)
5# ---------------------------------------------------------------------------
6
7# Import system modules
8import sys, string, os, arcgisscripting
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\\busselton_tsunami_scenario\\"
19output_dir = "anuga\\outputs\\"
20
21##time_dir1 = '20081211_154006_run_final_0.6_27255_alpha0.1_kvanputt'
22##time_dir2 = '20081211_162311_run_final_0_27255_alpha0.1_kvanputt'
23##time_dir3 = '20081211_162346_run_final_0_68693_alpha0.1_kvanputt'
24time_dir4 = '20081211_162433_run_final_0.6_68693_alpha0.1_kvanputt'
25##time_dir5 = '20081211_162656_run_final_0.6_27283_alpha0.1_kvanputt'
26##time_dir6 = '20081211_162744_run_final_0_27283_alpha0.1_kvanputt'
27
28time_dirs = [time_dir4] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
29
30for time_dir in time_dirs:
31
32    # Local variables...
33    folder =  scenario_dir + output_dir + time_dir + '\\'
34    input_dir_name = folder+'busselton_res.csv'
35    raster_gdb = folder + "raster.gdb"
36    layer = 'layer'
37   
38
39    print 'Process: Make XY Event Layer'
40    gp.MakeXYEventLayer_management(input_dir_name, "longitude", "latitude", layer, "GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];IsHighPrecision")
41
42    print 'Process: Feature Class to Feature Class'
43    gp.FeatureClassToFeatureClass_conversion(layer, raster_gdb, "busselton_res", "", "OBJECTID OBJECTID true true false 4 Long 0 10 ,First,#,busselton_res.csv_Features,OBJECTID,-1,-1;LONGITUDE LONGITUDE true true false 8 Double 0 0 ,First,#,busselton_res.csv_Features,LONGITUDE,-1,-1;LATITUDE LATITUDE true true false 8 Double 0 0 ,First,#,busselton_res.csv_Features,LATITUDE,-1,-1;STRUCT_INUNDATED STRUCT_INUNDATED true true false 4 Long 0 10 ,First,#,busselton_res.csv_Features,STRUCT_INUNDATED,-1,-1;STRUCT_DAMAGE_fraction STRUCT_DAMAGE_fraction true true false 8 Double 0 0 ,First,#,busselton_res.csv_Features,STRUCT_DAMAGE_fraction,-1,-1;COLLAPSE_CSV_INFO COLLAPSE_CSV_INFO true true false 255 Text 0 0 ,First,#,busselton_res.csv_Features,COLLAPSE_CSV_INFO,-1,-1;MAX_DEPTH_m MAX_DEPTH_m true true false 8 Double 0 0 ,First,#,busselton_res.csv_Features,MAX_DEPTH_m,-1,-1;STRUCT_COLLAPSED STRUCT_COLLAPSED true true false 255 Text 0 0 ,First,#,busselton_res.csv_Features,STRUCT_COLLAPSED,-1,-1;STRUCT_LOSS STRUCT_LOSS true true false 8 Double 0 0 ,First,#,busselton_res.csv_Features,STRUCT_LOSS,-1,-1;CONTENTS_DAMAGE_fraction CONTENTS_DAMAGE_fraction true true false 8 Double 0 0 ,First,#,busselton_res.csv_Features,CONTENTS_DAMAGE_fraction,-1,-1;CONTENTS_LOSS CONTENTS_LOSS true true false 8 Double 0 0 ,First,#,busselton_res.csv_Features,CONTENTS_LOSS,-1,-1", "")
44
Note: See TracBrowser for help on using the repository browser.