Changeset 6414


Ignore:
Timestamp:
Feb 25, 2009, 11:41:29 AM (15 years ago)
Author:
jgriffin
Message:

Data clipped individually, rather than after it is combined, to reduce memory allocation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/busselton/standardised_version/build_elevation.py

    r6376 r6414  
    5959        dem2pts(absolute_filename, use_cache=True, verbose=True)
    6060
    61         geospatial_data[filename] = Geospatial_data(file_name=absolute_filename+'.pts',
     61        G_grid = Geospatial_data(file_name=absolute_filename+'.pts',
    6262                                                    verbose=True)
     63        print 'Clip geospatial object'
     64        geospatial_data[filename] = G_grid.clip(project.bounding_polygon)
    6365
    6466# Create Geospatial data from TXT files
     
    6668    for filename in project.point_filenames:
    6769        absolute_filename = join(project.topographies_folder, filename)
    68         geospatial_data[filename] = Geospatial_data(file_name=absolute_filename,
     70        G_points = Geospatial_data(file_name=absolute_filename,
    6971                                                    verbose=True)
     72        print 'Clip geospatial object'
     73        geospatial_data[filename] = G_points.clip(project.bounding_polygon)
    7074
    7175#-------------------------------------------------------------------------------
     
    8286    G += geospatial_data[key]
    8387       
    84 print 'Clip combined geospatial data'
     88#print 'Clip combined geospatial data'
    8589##G_clip = G.clip_outside(project.poly_aoi1)
    8690##G_all = G_clip + geospatial_data[project.point_filenames[4]]
    8791#G_clipped = G_all.clip(project.poly_all)
    88 G_clip = G.clip(project.bounding_polygon)
     92#G_clip = G.clip(project.bounding_polygon)
    8993
    9094
    9195print 'Export combined DEM file'
    92 G_clip.export_points_file(project.combined_elevation + '.pts')
     96G.export_points_file(project.combined_elevation + '.pts')
    9397print 'Do txt version too'
    9498# Use for comparision in ARC
    95 G_clip.export_points_file(project.combined_elevation + '.txt')
     99G.export_points_file(project.combined_elevation + '.txt')
    96100
Note: See TracChangeset for help on using the changeset viewer.