- Timestamp:
- Oct 10, 2006, 12:10:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/geospatial_data/test_geospatial_data.py
r3717 r3723 476 476 477 477 478 def no_test_clip1_inside_outside(self):478 def test_clip1_inside_outside(self): 479 479 """test_clip1_inside_outside(self): 480 480 … … 487 487 points = [[-1, 4], [0.2, 0.5], [1.0, 2.1], [0.4, 0.3], [3.0, 5.3], 488 488 [0, 0], [2.4, 3.3]] 489 489 490 G = Geospatial_data(points) 490 491 … … 492 493 U = Geospatial_data([[0,0], [1,0], [1,1], [0,1]]) 493 494 G1 = G.clip(U) 495 assert allclose(G1.get_data_points(),[[0.2, 0.5], [0.4, 0.3], [0, 0]]) 496 494 497 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 497 508 498 509 def test_create_from_xya_file(self):
Note: See TracChangeset
for help on using the changeset viewer.