Changeset 4133
- Timestamp:
- Jan 5, 2007, 2:33:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth_2006/project.py
r4091 r4133 7 7 import sys 8 8 from time import localtime, strftime, gmtime 9 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon9 from anuga.utilities.polygon import read_polygon, plot_polygons, is_inside_polygon, number_mesh_triangles 10 10 #from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm 11 11 from anuga.utilities.system_tools import get_user_name … … 118 118 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 119 119 120 bounding_polygon= read_polygon(polygons_dir+'bounding_poly.csv')121 res_ bounding = 1000000120 poly_all = read_polygon(polygons_dir+'bounding_poly.csv') 121 res_poly_all = 100000 122 122 123 123 refzone = 50 … … 128 128 ############################### 129 129 130 poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20pts.csv') 131 res_pos20_neg20 = 500000 130 #poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20pts.csv') 131 poly_pos20_neg20 = read_polygon(polygons_dir+'pos20_neg20_new_pts.csv') 132 res_pos20_neg20 = 20000 132 133 133 poly_cbd = read_polygon(polygons_dir+'cbd_pts.csv') 134 res_cbd = 50000 134 #poly_cbd = read_polygon(polygons_dir+'cbd_pts.csv') 135 poly_cbd = read_polygon(polygons_dir+'cbd_new_pts.csv') 136 res_cbd = 1000 135 137 136 138 poly_penguin = read_polygon(polygons_dir+'penguin_pts.csv') 137 res_penguin = 50000139 res_penguin = 1000 138 140 #assert zone == refzone 139 141 140 trigs_bound = polygon_area(bounding_polygon)/res_bounding 141 trigs_pos = polygon_area(poly_pos20_neg20)/res_pos20_neg20 142 trigs_cbd = polygon_area(poly_cbd)/res_cbd 143 trigs_penguin = polygon_area(poly_penguin)/res_penguin 144 trigs_min = trigs_bound + trigs_pos + trigs_cbd + trigs_penguin 142 interior_regions = [[poly_pos20_neg20,res_pos20_neg20],[poly_cbd,res_cbd] 143 ,[poly_penguin,res_penguin]] 145 144 146 print 'Area of bounding poly', trigs_bound 147 print 'Area of pos20_neg20pts', trigs_pos 148 print 'Area of poly_cbd', trigs_cbd 149 print 'Area of poly_penguin', trigs_penguin 145 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 146 150 147 print 'min number triangles', trigs_min 151 152 148 153 149 ###################################################################
Note: See TracChangeset
for help on using the changeset viewer.