Changeset 5150 for anuga_work/production/geraldton/build_geraldton.py
- Timestamp:
- Mar 10, 2008, 4:00:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/geraldton/build_geraldton.py
r5012 r5150 36 36 #------------------------------------------------------------------------------ 37 37 38 39 38 print 'time stamp: ',project.build_time 40 print 'USER: ', project.user41 42 39 43 40 copy_code_files(project.output_build_time_dir,__file__, … … 45 42 46 43 start_screen_catcher(project.output_build_time_dir) 44 45 print 'time stamp: ',project.build_time 46 print 'USER: ', project.user, project.host 47 47 48 48 … … 81 81 82 82 print'create Geospatial data1 objects from topographies' 83 G1 = Geospatial_data(file_name = onshore_dir_name + '.pts' )83 G1 = Geospatial_data(file_name = onshore_dir_name + '.pts',verbose=True) 84 84 print'finished reading in %s.pts' %onshore_dir_name 85 G2 = Geospatial_data(file_name = coast_in_dir_name + '.txt' )86 G3 = Geospatial_data(file_name = island_dir_name + '.pts' )87 G4 = Geospatial_data(file_name = offshore_in_dir_name + '.txt' )85 G2 = Geospatial_data(file_name = coast_in_dir_name + '.txt',verbose=True) 86 G3 = Geospatial_data(file_name = island_dir_name + '.pts',verbose=True) 87 G4 = Geospatial_data(file_name = offshore_in_dir_name + '.txt',verbose=True) 88 88 print'finished reading in files' 89 89 90 G_onshore_clip = G1.clip(project.poly_all, verbose=True) 91 print 'finished clip' 92 G_onshore_clip_clipout=G_onshore_clip.clip_outside(project.poly_cbd, verbose=True) 93 print 'finished clipout' 94 # reduce resolution by 9 time (1/9) of the original file. This was determined 95 # as the resolution for this region is going to be 20000 and the asc grid cellsize is 96 # 30m there (900). The sqrt of 20000 is about 140 or 150, a 150m x150m grid would contain 97 # 36 points at a 30m grid spacing and we only need 4. So 4/36 is 1/9 or 0.11111 98 G_onshore_clip_clipout_reduced=G_onshore_clip_clipout.split(0.111, verbose=True) 90 #G_onshore_clip = G1.clip(project.poly_all, verbose=True) 91 #print 'finished clip' 92 #G_onshore_clip_clipout=G_onshore_clip.clip_outside(project.poly_cbd, verbose=True) 93 #print 'finished clipout' 94 ## reduce resolution by 10 time (1/10) of the original file. This was determined 95 ## as the resolution for this region is going to be 20000 and the asc grid cellsize is 96 ## 10m there (100). There is 2 20000m triangles in a 200m x 200m grid sqrt of 40000 is about 200, 97 ## a 200m x 200m area would contain 400 points at a 10m grid spacing and we only need 4. So 4/400 is 1/100 or 0.01 98 ## 1/100 reduction is possible but a 1/10 is enough to help with file size and loading 99 #G_onshore_clip_clipout_reduced=G_onshore_clip_clipout.split(0.1, verbose=True) 100 # 101 #G_cbd = G1.clip(projec.poly_cbd,verbose=True) 102 ##G_cbd_reduced = G_cbd.split(0.25, verbose=True) 103 # 104 #G_bathy = G4.clip(project.poly_all) 105 #G_island = G3.clip(project.poly_all) 106 #G_coast = G2.clip(project.poly_all) 107 # 108 #print'add all geospatial objects' 109 #G = G_onshore_clip_clipout_reduced + G_cbd_reduced + G_bathy + G_island + G_coast 99 110 100 G_cbd = G1.clip(projec.poly_cbd,verbose=True) 101 G_cbd_reduced = G_cbd.split(0.25, verbose=True) 111 G = G1 + G2 + G3 + G4 102 112 103 G_bathy = G4.clip(project.poly_all) 104 G_island = G3.clip(project.poly_all) 105 G_coast = G2.clip(project.poly_all) 106 107 print'add all geospatial objects' 108 G = G_onshore_clip_clipout_reduced + G_cbd_reduced + G_bathy + G_island + G_coast 113 G_clip = G.clip(project.poly_all, verbose=True) 109 114 110 115 print'clip combined geospatial object by bounding polygon' … … 116 121 if access(project.topographies_dir,F_OK) == 0: 117 122 mkdir (project.topographies_dir) 118 G .export_points_file(project.combined_dir_name + '.txt')123 G_clip.export_points_file(project.combined_dir_name + '.txt') 119 124 #G_clipped.export_points_file(project.combined_dir_name + '.xya') 120 G_small, = G.split(0.1, verbose)125 G_small,G_other = G_clip.split(0.01, verbose=True) 121 126 G_small.export_points_file(project.combined_dir_name_small + '.txt') 122 127
Note: See TracChangeset
for help on using the changeset viewer.