Ignore:
Timestamp:
Jan 21, 2009, 4:57:58 PM (15 years ago)
Author:
ole
Message:

Work on Patong w buildings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/patong/run_patong.py

    r6219 r6225  
    116116domain.set_quantity('friction', project.friction)
    117117print 'elevation'
    118 domain.set_quantity('elevation', 
     118domain.set_quantity('elevation',
    119119                    filename=project.combined_dir_name+'.pts',
     120                    alpha=project.alpha,                   
    120121                    use_cache=True,
    121                     verbose=True,
    122                     alpha=project.alpha)
     122                    verbose=True)
     123
    123124
    124125# Add buildings from file
    125126print 'Reading building polygons'   
    126127building_polygons, building_heights = csv2building_polygons(project.building_polygon_file)
     128                                                            #clipping_polygons=project.building_area_polygons)
    127129
    128130print 'Creating %d building polygons' % len(building_polygons)
    129 def create_polygon_function(building_polygons):
     131def create_polygon_function(building_polygons, geo_reference=None):
    130132    L = []
    131133    for i, key in enumerate(building_polygons):
     
    133135        poly = building_polygons[key]
    134136        elev = building_heights[key]
    135         L.append((poly, elev))#
     137        L.append((poly, elev))
    136138
    137139        buildings = Polygon_function(L, default=0.0,
    138                                      geo_reference=domain.geo_reference)
     140                                     geo_reference=geo_reference)
    139141    return buildings
    140142
    141143buildings = cache(create_polygon_function,
    142144                  building_polygons,
     145                  {'geo_reference': domain.geo_reference},
    143146                  verbose=True)
    144147
    145 print 'Add buildings'
    146 domain.add_quantity('elevation', buildings)
     148print 'Adding buildings'
     149domain.add_quantity('elevation',
     150                    buildings,
     151                    use_cache=False, # FIXME(OLE): This seems to pickup the stage IC??
     152                    verbose=True)
     153
    147154
    148155
Note: See TracChangeset for help on using the changeset viewer.