Ignore:
Timestamp:
Oct 10, 2006, 12:10:07 PM (18 years ago)
Author:
ole
Message:

Fixed ticket:95

File:
1 edited

Legend:

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

    r3717 r3723  
    476476
    477477
    478     def no_test_clip1_inside_outside(self):
     478    def test_clip1_inside_outside(self):
    479479        """test_clip1_inside_outside(self):
    480480       
     
    487487        points = [[-1, 4], [0.2, 0.5], [1.0, 2.1], [0.4, 0.3], [3.0, 5.3],
    488488                  [0, 0], [2.4, 3.3]]
     489
    489490        G = Geospatial_data(points)
    490491
     
    492493        U = Geospatial_data([[0,0], [1,0], [1,1], [0,1]])
    493494        G1 = G.clip(U)
     495        assert allclose(G1.get_data_points(),[[0.2, 0.5], [0.4, 0.3], [0, 0]])
     496       
    494497        G2 = G.clip_outside(U)
    495 
    496         assert allclose((G1+G2).get_data_points(),points)
     498        assert allclose(G2.get_data_points(),[[-1, 4], [1.0, 2.1],
     499                                              [3.0, 5.3], [2.4, 3.3]])
     500
     501       
     502        # New ordering
     503        new_points = [[0.2, 0.5], [0.4, 0.3], [0, 0]] +\
     504                     [[-1, 4], [1.0, 2.1], [3.0, 5.3], [2.4, 3.3]]
     505       
     506        assert allclose((G1+G2).get_data_points(), new_points)
     507       
    497508
    498509    def test_create_from_xya_file(self):
Note: See TracChangeset for help on using the changeset viewer.