Changeset 6225 for anuga_work/production/patong/run_patong.py
- Timestamp:
- Jan 21, 2009, 4:57:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/patong/run_patong.py
r6219 r6225 116 116 domain.set_quantity('friction', project.friction) 117 117 print 'elevation' 118 domain.set_quantity('elevation', 118 domain.set_quantity('elevation', 119 119 filename=project.combined_dir_name+'.pts', 120 alpha=project.alpha, 120 121 use_cache=True, 121 verbose=True ,122 alpha=project.alpha) 122 verbose=True) 123 123 124 124 125 # Add buildings from file 125 126 print 'Reading building polygons' 126 127 building_polygons, building_heights = csv2building_polygons(project.building_polygon_file) 128 #clipping_polygons=project.building_area_polygons) 127 129 128 130 print 'Creating %d building polygons' % len(building_polygons) 129 def create_polygon_function(building_polygons ):131 def create_polygon_function(building_polygons, geo_reference=None): 130 132 L = [] 131 133 for i, key in enumerate(building_polygons): … … 133 135 poly = building_polygons[key] 134 136 elev = building_heights[key] 135 L.append((poly, elev)) #137 L.append((poly, elev)) 136 138 137 139 buildings = Polygon_function(L, default=0.0, 138 geo_reference= domain.geo_reference)140 geo_reference=geo_reference) 139 141 return buildings 140 142 141 143 buildings = cache(create_polygon_function, 142 144 building_polygons, 145 {'geo_reference': domain.geo_reference}, 143 146 verbose=True) 144 147 145 print 'Add buildings' 146 domain.add_quantity('elevation', buildings) 148 print 'Adding buildings' 149 domain.add_quantity('elevation', 150 buildings, 151 use_cache=False, # FIXME(OLE): This seems to pickup the stage IC?? 152 verbose=True) 153 147 154 148 155
Note: See TracChangeset
for help on using the changeset viewer.