Changeset 4131 for anuga_core/source/anuga/utilities
- Timestamp:
- Jan 5, 2007, 2:30:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/utilities/polygon.py
r4095 r4131 737 737 FIXME: Add tests for this function 738 738 """ 739 import polygon_area739 from anuga.utilities.polygon import polygon_area 740 740 741 741 # TO DO check if any of the regions fall inside one another 742 742 no_triangles = 0.0 743 743 area = polygon_area(bounding_poly) 744 # print 'area of bounding_poly with res ',remainder_res,' is ', area/1000000. 744 745 for i,j in interior_regions: 745 746 this_area = polygon_area(i) 746 no_triangles += this_area/j 747 this_triangles = this_area/j 748 no_triangles += this_triangles 747 749 area -= this_area 748 750 #convert to square Kms 749 print 'area of ',j, this_area/1000000., area/1000000. 750 no_triangles += area/remainder_res 751 print 'area of',j, 'trigs', this_triangles, 'this area', this_area/1000000. 752 bound_triangles = area/remainder_res 753 no_triangles += bound_triangles 754 print 'area of',remainder_res,'bound triangles:', bound_triangles, 'bound area:', area/1000000. 751 755 return int(no_triangles/0.7) 752 753 756 754 757
Note: See TracChangeset
for help on using the changeset viewer.