Changeset 6441
- Timestamp:
- Mar 4, 2009, 8:26:22 AM (16 years ago)
- Location:
- branches/numpy/anuga
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/abstract_2d_finite_volumes/quantity.py
r6410 r6441 460 460 461 461 msg = 'Indices must be a list or None' 462 assert ( type(indices) in [ListType, NoneType]463 or isinstance(indices, num.ndarray)), msg462 assert (indices is None 463 or isinstance(indices, (list, num.ndarray))), msg 464 464 465 465 # Determine which 'set_values_from_...' to use 466 466 if numeric is not None: 467 if isinstance(numeric, num.ndarray) or isinstance(numeric, list):467 if isinstance(numeric, (list, num.ndarray)): 468 468 self.set_values_from_array(numeric, location, indices, 469 469 use_cache=use_cache, verbose=verbose) … … 479 479 indices, verbose=verbose, 480 480 use_cache=use_cache) 481 else: 481 else: # see if it's coercible to a float (float, int or long, etc) 482 482 try: 483 483 numeric = float(numeric) … … 521 521 self.extrapolate_first_order() 522 522 523 524 525 523 ############################################################################ 526 524 # Specific internal functions for setting values based on type … … 696 694 # @param use_cache ?? 697 695 # @param verbose True if this method is to be verbose. 698 def set_values_from_function(self, f, 699 location='vertices', 700 indices=None, 701 use_cache=False, 702 verbose=False): 696 def set_values_from_function(self, 697 f, 698 location='vertices', 699 indices=None, 700 use_cache=False, 701 verbose=False): 703 702 """Set values for quantity using specified function 704 703 … … 778 777 # @param verbose ?? 779 778 # @param use_cache ?? 780 def set_values_from_geospatial_data(self, geospatial_data, 781 alpha, 782 location, 783 indices, 784 verbose=False, 785 use_cache=False): 779 def set_values_from_geospatial_data(self, 780 geospatial_data, 781 alpha, 782 location, 783 indices, 784 verbose=False, 785 use_cache=False): 786 786 """Set values based on geo referenced geospatial data object.""" 787 787 … … 835 835 # @param verbose True if this method is to be verbose. 836 836 # @param use_cache ?? 837 def set_values_from_points(self, points, 838 values, 839 alpha, 840 location, 841 indices, 842 data_georef=None, 843 verbose=False, 844 use_cache=False): 837 def set_values_from_points(self, 838 points, 839 values, 840 alpha, 841 location, 842 indices, 843 data_georef=None, 844 verbose=False, 845 use_cache=False): 845 846 """Set quantity values from arbitray data points using fit_interpolate.fit""" 846 847 … … 857 858 # @param use_cache 858 859 # @param max_read_lines 859 def set_values_from_file(self, filename, 860 attribute_name, 861 alpha, 862 location, 863 indices, 864 verbose=False, 865 use_cache=False, 866 max_read_lines=None): 860 def set_values_from_file(self, 861 filename, 862 attribute_name, 863 alpha, 864 location, 865 indices, 866 verbose=False, 867 use_cache=False, 868 max_read_lines=None): 867 869 """Set quantity based on arbitrary points in a points file using 868 870 attribute_name selects name of attribute present in file. … … 1068 1070 # @param use_cache ?? 1069 1071 # @param verbose True if this method is to be verbose. 1070 def get_interpolated_values(self, interpolation_points, 1071 use_cache=False, 1072 verbose=False): 1072 def get_interpolated_values(self, 1073 interpolation_points, 1074 use_cache=False, 1075 verbose=False): 1073 1076 """Get values at interpolation points 1074 1077 … … 1118 1121 # @param use_cache 1119 1122 # @param verbose True if this method is to be verbose. 1120 def get_values(self, interpolation_points=None, 1121 location='vertices', 1122 indices=None, 1123 use_cache=False, 1124 verbose=False): 1123 def get_values(self, 1124 interpolation_points=None, 1125 location='vertices', 1126 indices=None, 1127 use_cache=False, 1128 verbose=False): 1125 1129 """Get values for quantity 1126 1130 … … 1228 1232 # @param use_cache ?? 1229 1233 # @param verbose?? 1230 def set_vertex_values(self, A, 1231 indices=None, 1232 use_cache=False, 1233 verbose=False): 1234 def set_vertex_values(self, 1235 A, 1236 indices=None, 1237 use_cache=False, 1238 verbose=False): 1234 1239 """Set vertex values for all unique vertices based on input array A 1235 1240 which has one entry per unique vertex, i.e. one value for each row in -
branches/numpy/anuga/abstract_2d_finite_volumes/test_general_mesh.py
r6428 r6441 366 366 if __name__ == "__main__": 367 367 suite = unittest.makeSuite(Test_General_Mesh, 'test') 368 #suite = unittest.makeSuite(Test_General_Mesh, 'test_get_vertex_coordinates_with_geo_ref')369 368 runner = unittest.TextTestRunner() 370 369 runner.run(suite) -
branches/numpy/anuga/abstract_2d_finite_volumes/test_region.py
r6410 r6441 265 265 266 266 if __name__ == "__main__": 267 #suite = unittest.makeSuite(Test_Region, 'test') 268 suite = unittest.makeSuite(Test_Region, 'test_unique_vertices_average_loc_vert') 267 suite = unittest.makeSuite(Test_Region, 'test') 269 268 runner = unittest.TextTestRunner() 270 269 runner.run(suite) -
branches/numpy/anuga/abstract_2d_finite_volumes/util.py
r6410 r6441 476 476 if boundary_polygon is not None: 477 477 #removes sts points that do not lie on boundary 478 #quantities[name] = num.take(quantities[name], gauge_id, 1) #was#479 478 quantities[name] = num.take(quantities[name], gauge_id, axis=1) 480 479 -
branches/numpy/anuga/coordinate_transforms/geo_reference.py
r6428 r6441 8 8 9 9 import types, sys 10 import copy 11 10 12 from anuga.utilities.numerical_tools import ensure_numeric 11 13 from anuga.utilities.anuga_exceptions import ANUGAError, TitleError, \ … … 240 242 # @return The changed points. 241 243 # @note If 'points' is a list then a changed list is returned. 242 # @note The input points data is changed.243 244 def change_points_geo_ref(self, points, points_geo_ref=None): 244 245 """Change the geo reference of a list or numeric array of points to … … 250 251 is_list = isinstance(points, list) 251 252 252 points = ensure_numeric( points, num.float)253 points = ensure_numeric(copy.copy(points), num.float) 253 254 254 255 # sanity checks … … 308 309 is_list = isinstance(points, list) 309 310 310 # convert to numeric array 311 points = ensure_numeric( points, num.float)311 # convert to numeric array, force a copy 312 points = ensure_numeric(copy.copy(points), num.float) 312 313 313 314 # sanity checks … … 328 329 points[:,0] += self.xllcorner 329 330 points[:,1] += self.yllcorner 330 #self.is_absolute = True331 331 332 332 # if we got a list, return a list -
branches/numpy/anuga/coordinate_transforms/test_geo_reference.py
r6428 r6441 239 239 new_points = g.get_absolute(points) 240 240 241 self.failUnless( type(new_points) == types.ListType, 'failed')241 self.failUnless(isinstance(new_points, list), 'failed') 242 242 self.failUnless(type(new_points) == type(points), 'failed') 243 243 for point, new_point in map(None, points, new_points): … … 250 250 new_points = g.get_absolute(points) 251 251 252 self.failUnless( type(new_points) == types.ListType, 'failed')252 self.failUnless(isinstance(new_points, list), 'failed') 253 253 self.failUnless(type(new_points) == type(points), 'failed') 254 254 for point, new_point in map(None, points, new_points): … … 259 259 # first call 260 260 dx = 10.0 261 dy = 1 0.0261 dy = 12.0 262 262 g = Geo_reference(56, dx, dy) 263 263 points = [[3.0,34.0], [64.0,6.0]] … … 265 265 new_points = g.get_absolute(points) 266 266 267 self.failUnless(type(new_points) == types.ListType, 'failed') 268 self.failUnless(type(new_points) == type(points), 'failed') 269 for point, new_point in map(None, expected_new_points, new_points): 270 self.failUnless(point[0] == new_point[0], 'failed') 271 self.failUnless(point[1] == new_point[1], 'failed') 267 self.failUnless(isinstance(new_points, list), 'failed') 268 self.failUnless(type(new_points) == type(points), 'failed') 269 self.failUnless(new_points == expected_new_points, 'failed') 272 270 273 271 # and repeat from 'new_points = g.get_absolute(points)' above … … 275 273 new_points = g.get_absolute(points) 276 274 277 self.failUnless(type(new_points) == types.ListType, 'failed') 278 self.failUnless(type(new_points) == type(points), 'failed') 279 for point, new_point in map(None, expected_new_points, new_points): 280 self.failUnless(point[0] == new_point[0], 'failed') 281 self.failUnless(point[1] == new_point[1], 'failed') 275 self.failUnless(isinstance(new_points, list), 'failed') 276 self.failUnless(type(new_points) == type(points), 'failed') 277 self.failUnless(new_points == expected_new_points, 'failed') 282 278 283 279 def test_get_absolute_array(self): … … 294 290 self.failUnless(isinstance(new_points, num.ndarray), 'failed') 295 291 self.failUnless(type(new_points) == type(points), 'failed') 296 self.failUnless(num.alltrue(points == new_points), 'failed') 292 msg = 'points=\n%s\nnew_points=\n%s' % (str(points), str(new_points)) 293 for point, new_point in map(None, points, new_points): 294 self.failUnless(point[0]+x == new_point[0], 'failed') 295 self.failUnless(point[1]+y == new_point[1], 'failed') 297 296 298 297 # test with no supplied offsets … … 307 306 # test that calling get_absolute twice does the right thing 308 307 # first call 309 dx = 1 0.0310 dy = 1 0.0308 dx = 11.0 309 dy = 13.0 311 310 g = Geo_reference(56, dx, dy) 312 311 points = num.array([[3.0,34.0], [64.0,6.0]]) … … 336 335 self.failUnless(isinstance(new_points, num.ndarray), 'failed') 337 336 self.failUnless(type(new_points) == type(points), 'failed') 338 msg = (' Second call of .get_absolute() returned %s\nexpected %s'337 msg = ('Third call of .get_absolute() returned %s\nexpected %s' 339 338 % (str(new_points), str(expected_new_points))) 340 339 self.failUnless(num.alltrue(expected_new_points == new_points), msg) … … 534 533 if __name__ == "__main__": 535 534 suite = unittest.makeSuite(geo_referenceTestCase, 'test') 536 #suite = unittest.makeSuite(geo_referenceTestCase, 'test_functionality_get_absolute')537 535 runner = unittest.TextTestRunner() #verbosity=2) 538 536 runner.run(suite) -
branches/numpy/anuga/fit_interpolate/test_fit.py
r6304 r6441 1102 1102 runner.run(suite) 1103 1103 1104 1105 1106 1107 -
branches/numpy/anuga/fit_interpolate/test_interpolate.py
r6360 r6441 939 939 f = num.array([linear_function(vertices), 2*linear_function(vertices)]) 940 940 f = num.transpose(f) 941 print 'f=\n%s' % str(f)942 941 z = interp.interpolate_block(f, point_coords) 943 942 answer = [linear_function(point_coords.get_data_points(absolute=True)), 944 943 2*linear_function(point_coords.get_data_points(absolute=True)) 945 944 ] 946 print 'After creation, answer=\n%s' % str(answer)947 945 answer = num.transpose(answer) 948 print "z=\n%s" % str(z)949 print "answer=\n%s" % str(answer)950 946 msg = ('Expected z\n%s\nto be close to answer\n%s' 951 947 % (str(z), str(answer))) … … 1851 1847 if __name__ == "__main__": 1852 1848 suite = unittest.makeSuite(Test_Interpolate,'test') 1853 #suite = unittest.makeSuite(Test_Interpolate,'test_interpolate_geo_spatial')1854 1849 runner = unittest.TextTestRunner() #verbosity=1) 1855 1850 runner.run(suite) -
branches/numpy/anuga/geospatial_data/geospatial_data.py
r6428 r6441 918 918 # @param data_points ?? 919 919 # @param points_are_lats_longs ?? 920 # @note IS THIS USED??? 920 921 def _set_using_lat_long(latitudes, 921 922 longitudes, … … 968 969 """Read .pts NetCDF file 969 970 970 Return a dic of array of points, and dic of array of attribute971 Return a (dict_points, dict_attribute, geo_ref) 971 972 eg 972 dic ['points'] = [[1.0,2.0],[3.0,5.0]]973 dic ['attributelist']['elevation'] = [[7.0,5.0]]973 dict['points'] = [[1.0,2.0],[3.0,5.0]] 974 dict['attributelist']['elevation'] = [[7.0,5.0]] 974 975 """ 975 976 … … 1182 1183 1183 1184 ## 1184 # @brief Read the body of a . csffile, with blocking.1185 # @brief Read the body of a .pts file, with blocking. 1185 1186 # @param fid Handle to already open file. 1186 1187 # @param start_row Start row index of points to return. … … 1189 1190 # @return Tuple of (pointlist, attributes). 1190 1191 def _read_pts_file_blocking(fid, start_row, fin_row, keys): 1191 '''Read the body of a . csvfile.'''1192 '''Read the body of a .pts file.''' 1192 1193 1193 1194 pointlist = num.array(fid.variables['points'][start_row:fin_row]) … … 1514 1515 1515 1516 data_file: must not contain points outside the boundaries defined 1516 and it either a pts, txt or csv file.1517 and it must be either a pts, txt or csv file. 1517 1518 1518 1519 alpha_list: the alpha values to test in a single list -
branches/numpy/anuga/geospatial_data/test_geospatial_data.py
r6428 r6441 1412 1412 new_geospatial = ensure_geospatial(data_points, geo_reference=geo) 1413 1413 new_points = new_geospatial.get_data_points(absolute=True) 1414 assert num.allclose(new_points, ab_points) 1414 msg = ('new_points=\n%s\nab_points=\n%s' 1415 % (str(new_points), str(ab_points))) 1416 assert num.allclose(new_points, ab_points), msg 1415 1417 1416 1418 geo_reference = Geo_reference(56, 100, 200) -
branches/numpy/anuga/shallow_water/shallow_water_domain.py
r6410 r6441 1613 1613 1614 1614 # Is this really what we want? 1615 msg = 'Function %s must return vector' % str(f) 1615 # info is "(func name, filename, defining line)" 1616 func_info = (f.func_name, f.func_code.co_filename, 1617 f.func_code.co_firstlineno) 1618 msg = ('Function %s() must return vector (defined in %s, line %d)' 1619 % func_info) 1616 1620 assert hasattr(q, 'len'), msg 1617 1621 1618 msg = ('Return vector from function %s must have same '1619 'length as input vectors ' % f)1622 msg = ('Return vector from function %s() must have same ' 1623 'length as input vectors\nq=%s' % (f.func_name, str(q))) 1620 1624 assert len(q) == N, msg 1621 1625 else: … … 1623 1627 f = float(f) 1624 1628 except: 1625 msg = ('Force field %s must be either a vector function or a'1626 'scalar value (coercible to float).'% str(f))1629 msg = ('Force field %s must be a scalar value coercible to float.' 1630 % str(f)) 1627 1631 raise Exception, msg 1628 1632 … … 1926 1930 if self.polygon is not None: 1927 1931 # Inlet is polygon 1928 inlet_region = 'polygon=%s, area=%f m^2' % (self.polygon,1929 self.exchange_area)1932 inlet_region = ('polygon=\n%s, area=%f m^2' % 1933 (self.polygon, self.exchange_area)) 1930 1934 1931 1935 self.exchange_indices = inside_polygon(points, self.polygon) -
branches/numpy/anuga/shallow_water/test_eq.py
r6410 r6441 63 63 if __name__ == "__main__": 64 64 suite = unittest.makeSuite(Test_eq,'test_Okada_func') 65 #suite = unittest.makeSuite(Test_eq,'test_earthquake_tsunami')66 65 runner = unittest.TextTestRunner() 67 66 runner.run(suite) -
branches/numpy/anuga/shallow_water/test_shallow_water_domain.py
r6410 r6441 6062 6062 #The diagonal points of domain 1 are 0, 5, 10, 15 6063 6063 6064 #print points[0], points[5], points[10], points[15]6065 msg = ('value was\n%s\nshould be\n'6066 '[[0,0], [1.0/3, 1.0/3],\n'6067 '[2.0/3, 2.0/3], [1,1]]'6068 % str(num.take(points, [0,5,10,15], axis=0)))6069 6064 assert num.allclose(num.take(points, [0,5,10,15], axis=0), 6070 [[0,0], [1.0/3, 1.0/3], [2.0/3, 2.0/3], [1,1]]) , msg6065 [[0,0], [1.0/3, 1.0/3], [2.0/3, 2.0/3], [1,1]]) 6071 6066 6072 6067 … … 6643 6638 6644 6639 if __name__ == "__main__": 6645 #suite = unittest.makeSuite(Test_Shallow_Water, 'test') 6646 suite = unittest.makeSuite(Test_Shallow_Water, 'test_get_maximum_inundation_from_sww') 6640 suite = unittest.makeSuite(Test_Shallow_Water, 'test') 6647 6641 runner = unittest.TextTestRunner(verbosity=1) 6648 6642 runner.run(suite) -
branches/numpy/anuga/utilities/numerical_tools.py
r6428 r6441 250 250 If not, let numeric package decide. 251 251 numpy assumes float64 if no type in A. 252 typecode will always be one of num.float, num.int, etc. 253 254 Note that num.array(A, dtype) will sometimes copy. Use 'copy=False' to 255 copy only when required. 252 256 253 257 This function is necessary as array(A) can cause memory overflow. … … 264 268 return num.array(A) 265 269 else: 266 if isinstance(A, num.ndarray): 267 if A.dtype == typecode: 268 # return num.array(A) #FIXME: Shouldn't this just return A? 269 return A 270 else: 271 return num.array(A, dtype=typecode) 272 else: 273 return num.array(A, dtype=typecode) 270 return num.array(A, dtype=typecode, copy=False) 274 271 275 272 -
branches/numpy/anuga/utilities/quad.py
r6158 r6441 184 184 #y = self.mesh.coordinates[point][1] 185 185 node = self.mesh.get_node(point, absolute=True) 186 print "node", node187 print "(" + str(node[0]) + "," + str(node[1]) + ")"188 raise 'point not in region: %s' %str(point)186 msg = ('point not in region: %s\nnode=%s' 187 % (str(point), str(node))) 188 raise Exception, msg 189 189 190 190 -
branches/numpy/anuga/utilities/test_numerical_tools.py
r6410 r6441 466 466 # t(num.array('abc', num.float), False) 467 467 468 ## 469 # @brief Test to see if ensure_numeric() behaves as we expect. 470 # @note Under Numeric ensure_numeric() *always* returned a copy. 471 # Under numpy it copies only when it has to. 472 def test_ensure_numeric_copy(self): 473 ##### 474 # Make 'points' a _list_ of coordinates. 475 # Should be changed by ensure_numeric(). 476 ##### 477 points = [[1.,2.], [3.,4.], [5.,6.]] 478 points_id = id(points) 479 480 points_new = ensure_numeric(points, num.float) 481 points_new_id = id(points_new) 482 483 msg = 'ensure_numeric() should return a copy of a list' 484 self.failUnless(points_new_id != points_id, msg) 485 486 # should never change it's input parameter 487 msg = "ensure_numeric() changed it's input parameter" 488 self.failUnless(points_id == id(points), msg) 489 490 ##### 491 # Make 'points' a _tuple_ of coordinates. 492 # Should be changed by ensure_numeric(). 493 ##### 494 points = ((1.,2.), (3.,4.), (5.,6.)) 495 points_id = id(points) 496 497 points_new = ensure_numeric(points, num.int) 498 points_new_id = id(points_new) 499 500 msg = 'ensure_numeric() should return a copy of a list' 501 self.failUnless(points_new_id != points_id, msg) 502 503 # should never change it's input parameter 504 msg = "ensure_numeric() changed it's input parameter" 505 self.failUnless(points_id == id(points), msg) 506 507 ##### 508 # Make 'points' a numeric array of float coordinates. 509 # Should NOT be changed by ensure_numeric(). 510 ##### 511 points = num.array([[1.,2.], [3.,4.], [5.,6.]], num.float) 512 points_id = id(points) 513 514 points_new = ensure_numeric(points, num.float) 515 points_new_id = id(points_new) 516 517 msg = 'ensure_numeric() should return the original input' 518 self.failUnless(points_new_id == points_id, msg) 519 520 # should never change it's input parameter 521 msg = "ensure_numeric() changed it's input parameter" 522 self.failUnless(points_id == id(points), msg) 523 524 ##### 525 # Make 'points' a numeric array of int coordinates. 526 # Should be changed by ensure_numeric(). 527 ##### 528 points = num.array([[1,2], [3,4], [5,6]], num.int) 529 points_id = id(points) 530 531 points_new = ensure_numeric(points, num.float) 532 points_new_id = id(points_new) 533 534 msg = 'ensure_numeric() should return a copy of the input' 535 self.failUnless(points_new_id != points_id, msg) 536 537 # should never change it's input parameter 538 msg = "ensure_numeric() changed it's input parameter" 539 self.failUnless(points_id == id(points), msg) 540 541 ##### 542 # Make 'points' a numeric array of int coordinates. 543 # Should NOT be changed by ensure_numeric(, num.int). 544 ##### 545 points = num.array([[1,2], [3,4], [5,6]], num.int) 546 points_id = id(points) 547 548 points_new = ensure_numeric(points, num.int) 549 points_new_id = id(points_new) 550 551 msg = 'ensure_numeric() should return the original input' 552 self.failUnless(points_new_id == points_id, msg) 553 554 # should never change it's input parameter 555 msg = "ensure_numeric() changed it's input parameter" 556 self.failUnless(points_id == id(points), msg) 557 468 558 ################################################################################ 469 559 -
branches/numpy/anuga/utilities/test_polygon.py
r6410 r6441 1551 1551 1552 1552 def test_inside_polygon_geospatial(self): 1553 # 1553 #Simplest case: Polygon is the unit square 1554 1554 polygon_absolute = [[0,0], [1,0], [1,1], [0,1]] 1555 1555 poly_geo_ref = Geo_reference(57, 100, 100) 1556 1556 polygon = poly_geo_ref.change_points_geo_ref(polygon_absolute) 1557 1557 poly_spatial = Geospatial_data(polygon, geo_reference=poly_geo_ref) 1558 point_absolute = (0.5, 0.5) 1558 1559 points_absolute = (0.5, 0.5) 1559 1560 points_geo_ref = Geo_reference(57, 78, -56) 1560 point = points_geo_ref.change_points_geo_ref(point_absolute) 1561 point_spatial = Geospatial_data(point, geo_reference=points_geo_ref) 1562 1563 msg = ('point_absolute\n%s\nis not inside polygon_absolute\n%s' 1564 % (str(point_absolute), str(polygon_absolute))) 1565 assert is_inside_polygon(point_absolute, polygon_absolute), msg 1566 1567 msg = ('ensure_numeric(point_absolute)\n%s\n' 1568 'is not inside ensure_numeric(polygon_absolute)\n%s' 1569 % (str(ensure_numeric(ensure_numeric(point_absolute))), 1570 str(polygon_absolute))) 1571 assert is_inside_polygon(ensure_numeric(point_absolute), 1572 ensure_numeric(polygon_absolute)), msg 1573 1574 msg = ('point_absolute\n%s\nis not inside poly_spatial\n%s' 1575 % (str(point_absolute), str(poly_spatial))) 1576 assert is_inside_polygon(point_absolute, poly_spatial), msg 1577 1578 msg = ('point_spatial\n%s\nis not inside poly_spatial\n%s' 1579 % (str(point_spatial), str(poly_spatial))) 1580 assert is_inside_polygon(point_spatial, poly_spatial), msg 1581 1582 msg = ('point_spatial\n%s\nis not inside polygon_absolute\n%s' 1583 % (str(point_spatial), str(polygon_absolute))) 1584 assert is_inside_polygon(point_spatial, polygon_absolute), msg 1585 1586 msg = ('point_absolute\n%s\nis not inside polygon_absolute\n%s' 1587 % (str(point_absolute), str(polygon_absolute))) 1588 assert is_inside_polygon(point_absolute, polygon_absolute), msg 1561 points = points_geo_ref.change_points_geo_ref(points_absolute) 1562 points_spatial = Geospatial_data(points, geo_reference=points_geo_ref) 1563 1564 assert is_inside_polygon(points_absolute, polygon_absolute) 1565 assert is_inside_polygon(ensure_numeric(points_absolute), 1566 ensure_numeric(polygon_absolute)) 1567 assert is_inside_polygon(points_absolute, poly_spatial) 1568 assert is_inside_polygon(points_spatial, poly_spatial) 1569 assert is_inside_polygon(points_spatial, polygon_absolute) 1570 1571 assert is_inside_polygon(points_absolute, polygon_absolute) 1589 1572 1590 1573 def NOtest_decimate_polygon(self): … … 1758 1741 if __name__ == "__main__": 1759 1742 suite = unittest.makeSuite(Test_Polygon,'test') 1760 #suite = unittest.makeSuite(Test_Polygon,'test_inside_polygon_badtest_1')1761 1743 runner = unittest.TextTestRunner() 1762 1744 runner.run(suite)
Note: See TracChangeset
for help on using the changeset viewer.