Changeset 1058


Ignore:
Timestamp:
Mar 10, 2005, 3:41:07 PM (20 years ago)
Author:
duncan
Message:

name change

Location:
inundation/ga/storm_surge/pyvolution/coordinate_transforms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/coordinate_transforms/geo_reference.py

    r1057 r1058  
    7474        #false_northing = infile.false_northing[0]
    7575
    76     def change_point_geo_ref(self, points,
    77                        point_geo_ref=None):
     76    def change_points_geo_ref(self, points,
     77                       points_geo_ref=None):
    7878        """
    7979        Change the reference of a list or Numeric array of points.
     
    9595        points = array(points).astype(Float)
    9696        #add point geo ref to points
    97         if not point_geo_ref is None:
    98             points[:,0] += point_geo_ref.xllcorner
    99             points[:,1] += point_geo_ref.yllcorner
     97        if not points_geo_ref is None:
     98            points[:,0] += points_geo_ref.xllcorner
     99            points[:,1] += points_geo_ref.yllcorner
    100100       
    101101        #subtract primary geo ref from points
  • inundation/ga/storm_surge/pyvolution/coordinate_transforms/test_geo_reference.py

    r1057 r1058  
    4848        self.failUnless(g == new_g, 'test_read_write_ASCII failed') 
    4949   
    50     def test_change_point_geo_ref(self):
     50    def test_change_points_geo_ref(self):
    5151        x = 3.0
    5252        y = 3.0
    5353        g = Geo_reference(56,x,y)
    5454        lofl = [[3.0,3.0], [6.0,6.0]]
    55         new_lofl = g.change_point_geo_ref(lofl)
     55        new_lofl = g.change_points_geo_ref(lofl)
    5656        #print "lofl",lofl
    5757        #print "new_lofl",new_lofl
     
    6363            self.failUnless(point[1]-y==new_point[1], ' failed')
    6464       
    65     def test_change_point_geo_ref2(self):
     65    def test_change_points_geo_ref2(self):
    6666        x = 3.0
    6767        y = 3.0
    6868        g = Geo_reference(56,x,y)
    6969        lofl = [[3.0,3.0]]
    70         new_lofl = g.change_point_geo_ref(lofl)
     70        new_lofl = g.change_points_geo_ref(lofl)
    7171        #print "lofl",lofl
    7272        #print "new_lofl",new_lofl
     
    7878            self.failUnless(point[1]-y==new_point[1], ' failed')
    7979       
    80     def test_change_point_geo_ref3(self):
     80    def test_change_points_geo_ref3(self):
    8181        x = 3.0
    8282        y = 3.0
    8383        g = Geo_reference(56,x,y)
    8484        lofl = [3.0,3.0]
    85         new_lofl = g.change_point_geo_ref(lofl)
     85        new_lofl = g.change_points_geo_ref(lofl)
    8686        #print "lofl",lofl
    8787        #print "new_lofl",new_lofl
     
    9494       
    9595   
    96     def test_change_point_geo_ref4(self):
     96    def test_change_points_geo_ref4(self):
    9797        x = 3.0
    9898        y = 3.0
    9999        g = Geo_reference(56,x,y)
    100100        lofl = array([[3.0,3.0], [6.0,6.0]])
    101         new_lofl = g.change_point_geo_ref(lofl)
     101        new_lofl = g.change_points_geo_ref(lofl)
    102102        #print "4 lofl",lofl
    103103        #print "4 new_lofl",new_lofl
     
    109109        assert allclose(lofl,new_lofl)
    110110       
    111     def test_change_point_geo_ref5(self):
     111    def test_change_points_geo_ref5(self):
    112112        x = 3.0
    113113        y = 3.0
    114114        g = Geo_reference(56,x,y)
    115115        lofl = array([[3.0,3.0]])
    116         new_lofl = g.change_point_geo_ref(lofl)
     116        new_lofl = g.change_points_geo_ref(lofl)
    117117        #print "5 lofl",lofl
    118118        #print "5 new_lofl",new_lofl
     
    124124            self.failUnless(point[1]-y==new_point[1], ' failed')
    125125       
    126     def test_change_point_geo_ref6(self):
     126    def test_change_points_geo_ref6(self):
    127127        x = 3.0
    128128        y = 3.0
    129129        g = Geo_reference(56,x,y)
    130130        lofl = array([3.0,3.0])
    131         new_lofl = g.change_point_geo_ref(lofl)
     131        new_lofl = g.change_points_geo_ref(lofl)
    132132        #print "lofl",lofl
    133133        #print "new_lofl",new_lofl
     
    139139            self.failUnless(point[1]-y==new_point[1], ' failed')
    140140     
    141     def test_change_point_geo_ref7(self):
     141    def test_change_points_geo_ref7(self):
    142142        x = 3.0
    143143        y = 3.0
     
    145145        point_y = -60.0
    146146        g = Geo_reference(56,x,y)
    147         point_geo_ref = Geo_reference(56,point_x,point_y)
     147        points_geo_ref = Geo_reference(56,point_x,point_y)
    148148        lofl = [[3.0,3.0], [6.0,6.0]]
    149         new_lofl = g.change_point_geo_ref(lofl,point_geo_ref=point_geo_ref)
     149        new_lofl = g.change_points_geo_ref(lofl,points_geo_ref=points_geo_ref)
    150150        #print "lofl",lofl
    151151        #print "new_lofl",new_lofl
Note: See TracChangeset for help on using the changeset viewer.