Ignore:
Timestamp:
Oct 10, 2006, 5:58:12 PM (18 years ago)
Author:
sexton
Message:

incorporating test to catch get_attributes from clipped geospatial data set (no_test_clip1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/geospatial_data/test_geospatial_data.py

    r3735 r3736  
    395395                        [[0.5, 0.5], [1, -0.5], [1.5, 0]])
    396396
    397     def test_clip1(self):
     397    def no_test_clip1(self):
    398398        """test_clip1(self):
    399399       
     
    406406        points = [[-1, 4], [0.2, 0.5], [1.0, 2.1], [0.4, 0.3], [3.0, 5.3],
    407407                  [0, 0], [2.4, 3.3]]
    408         G = Geospatial_data(points)
    409 
     408        attributes = [2, -4, 5, 76, -2, 0.1, 3]
     409        att_dict = {'att1': attributes,
     410                    'att2': array(attributes) +1}
     411        G = Geospatial_data(points, att_dict)
     412       
    410413        # First try the unit square   
    411414        U = Geospatial_data([[0,0], [1,0], [1,1], [0,1]])
     
    413416                        [[0.2, 0.5], [0.4, 0.3], [0, 0]])
    414417
     418        assert allclose(G.clip(U).get_attributes('att1'), [-4, 76, 0.1])
     419        #assert allclose(G.clip(U).get_attributes('att2'), ???)
     420       
    415421        # Then a more complex polygon
    416422        points = [ [0.5, 1.4], [0.5, 0.5], [1, -0.5], [1.5, 0], [0.5, 1.5], [0.5, -0.5]]
Note: See TracChangeset for help on using the changeset viewer.