Ignore:
Timestamp:
Jan 10, 2007, 4:50:53 PM (18 years ago)
Author:
duncan
Message:

removing read/write of .xya files from loadASCII.py

Location:
anuga_core/source/anuga/fit_interpolate
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/fit_interpolate/fit.py

    r4138 r4165  
    500500
    501501
    502 def fit_to_mesh_file(mesh_file, point_file, mesh_output_file,
     502def obsolete_fit_to_mesh_file(mesh_file, point_file, mesh_output_file,
    503503                     alpha=DEFAULT_ALPHA, verbose= False,
    504504                     display_errors = True):
     
    516516   
    517517    """
     518    #OBSOLETE
     519    #Problems with using blocking and knowing the attribute title..
     520
    518521
    519522    # Question
     
    553556    # load in the .pts file
    554557    try:
    555         point_dict = import_points_file(point_file, verbose=verbose)
     558        #point_dict = import_points_file(point_file, verbose=verbose)
     559       
     560        geospatial = Geospatial_data(point_file)
     561        point_coordinates = geospatial.get_data_points(absolute=False)
    556562    except IOError,e:
    557563        if display_errors:
     
    559565        raise IOError  #Re-raise exception 
    560566
    561     point_coordinates = point_dict['pointlist']
    562     title_list,point_attributes = concatinate_attributelist(point_dict['attributelist'])
    563 
    564     if point_dict.has_key('geo_reference') and not point_dict['geo_reference'] is None:
    565         data_origin = point_dict['geo_reference'].get_origin()
    566     else:
    567         data_origin = (56, 0, 0) #FIXME(DSG-DSG)
     567    #point_coordinates = point_dict['pointlist']
     568    #get_all_attributes
     569    #title_list,point_attributes = concatinate_attributelist(point_dict['attributelist'])
     570    title_list,point_attributes = concatinate_attributelist( \
     571        geospatial.get_all_attributes())
     572
    568573
    569574    if mesh_dict.has_key('geo_reference') and not mesh_dict['geo_reference'] is None:
     
    576581    f = fit_to_mesh(vertex_coordinates,
    577582                    triangles,
    578                     point_coordinates,
    579                     point_attributes,
     583                    point_file,
    580584                    alpha = alpha,
    581585                    verbose = verbose,
  • anuga_core/source/anuga/fit_interpolate/test_fit.py

    r4144 r4165  
    271271       
    272272        f = fit_to_mesh(vertices, triangles,fileName,
    273                                 alpha=0.0, max_read_lines=2)#, verbose=True)
     273                                alpha=0.0, max_read_lines=2)
     274                        #use_cache=True, verbose=True)
    274275        answer = linear_function(vertices)
    275276        #print "f\n",f
     
    604605
    605606
    606     def test_fit_to_mesh_file(self):
     607    def obsolete_test_fit_to_mesh_file(self):
    607608        from load_mesh.loadASCII import import_mesh_file, \
    608609             export_mesh_file
     
    656657
    657658
    658     def test_fit_to_mesh_file3(self):
     659    def obsolete_test_fit_to_mesh_file3(self):
    659660        from load_mesh.loadASCII import import_mesh_file, \
    660661             export_mesh_file
     
    708709        os.remove(mesh_output_file)
    709710
    710     def test_fit_to_mesh_file4(self):
     711    def obsolete_test_fit_to_mesh_file4(self):
    711712        from load_mesh.loadASCII import import_mesh_file, \
    712713             export_mesh_file
     
    762763        os.remove(mesh_output_file)
    763764
    764     def test_fit_to_mesh_fileII(self):
     765    def obsolete_test_fit_to_mesh_fileII(self):
    765766        from load_mesh.loadASCII import import_mesh_file, \
    766767             export_mesh_file
     
    813814        os.remove(point_file)
    814815
    815     def test_fit_to_mesh_file_errors(self):
     816    def obsolete_test_fit_to_mesh_file_errors(self):
    816817        from load_mesh.loadASCII import import_mesh_file, export_mesh_file
    817818        import tempfile
     
    851852        os.remove(point_file)
    852853
    853     def test_fit_to_mesh_file_errorsII(self):
     854    def obsolete_test_fit_to_mesh_file_errorsII(self):
    854855        from load_mesh.loadASCII import import_mesh_file, export_mesh_file
    855856        import tempfile
     
    881882        os.remove(point_file)
    882883
    883     def test_fit_to_mesh_file_errorsIII(self):
     884    def obsolete_test_fit_to_mesh_file_errorsIII(self):
    884885        from load_mesh.loadASCII import import_mesh_file, export_mesh_file
    885886        import tempfile
Note: See TracChangeset for help on using the changeset viewer.