Ignore:
Timestamp:
Jan 25, 2006, 12:11:06 PM (19 years ago)
Author:
duncan
Message:

adding new pmesh.mesh interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/coordinate_transforms/geo_reference.py

    r2262 r2276  
    117117        If the points do not have a geo ref, assume 'absolute' values
    118118        """
    119         # currently untested
    120         if points_geo_ref is self:
    121             return points
    122119       
    123120        is_list = False
     
    125122            is_list = True
    126123            if len(points)>0 and type(points[0]) not in [types.ListType,types.TupleType]:
    127                 #a single pont is being passed.  make it a list of lists
     124                #a single point is being passed.  make it a list of lists
    128125                points = [points]
    129126        elif type(points) == ArrayType:
    130127            if len(points.shape) == 1:
    131128                points = [points]
    132                
     129       
     130        # currently untested
     131        # Always returns a list of lists
     132        if points_geo_ref is self:
     133            return points       
    133134           
    134135        #convert into array
     
    165166        # convert into array
    166167        points = array(points).astype(Float)
    167      
    168168        # add primary geo ref from points
    169169        points[:,0] += self.xllcorner
     
    171171        if is_list:
    172172            points = points.tolist()
    173            
     173             
    174174        return points
    175175
Note: See TracChangeset for help on using the changeset viewer.