Ignore:
Timestamp:
Oct 7, 2004, 2:50:59 PM (20 years ago)
Author:
duncan
Message:

minor changes - vert att titles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/least_squares.py

    r362 r374  
    5555                 load_xya_file, export_trianglulation_file
    5656    # load in the .tsh file
    57     mesh_dic = mesh_file_to_mesh_dictionary(mesh_file)
    58     vertex_coordinates = mesh_dic['generatedpointlist']
    59     triangles = mesh_dic['generatedtrianglelist']
     57    mesh_dict = mesh_file_to_mesh_dictionary(mesh_file)
     58    vertex_coordinates = mesh_dict['generatedpointlist']
     59    triangles = mesh_dict['generatedtrianglelist']
    6060       
    6161    # load in the .xya file
     
    6464    point_attributes = point_dict['pointattributelist']
    6565    point_attributes = point_dict['pointattributelist']
    66        
    67        
     66    title_string = point_dict['title']
     67    title_list = title_string.split(',') #iffy! Hard coding title delimiter
     68    #print "title_list", title_list   
     69    for i in range(len(title_list)):
     70        title_list[i] = title_list[i].strip()
     71    #print "title_list stripped", title_list   
    6872    f = fit_to_mesh(vertex_coordinates,
    6973                    triangles,
     
    7276                    alpha = alpha)
    7377    # convert array to list of lists
    74     mesh_dic['generatedpointattributelist'] = f.tolist()
    75     export_trianglulation_file(mesh_output_file, mesh_dic)
     78    mesh_dict['generatedpointattributelist'] = f.tolist()
     79    mesh_dict['generatedpointattributetitlelist'] = title_list
     80    export_trianglulation_file(mesh_output_file, mesh_dict)
    7681       
    7782
Note: See TracChangeset for help on using the changeset viewer.