Changeset 3351 for inundation/geospatial_data
- Timestamp:
- Jul 18, 2006, 1:51:19 PM (19 years ago)
- Location:
- inundation/geospatial_data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/geospatial_data/geospatial_data.py
r3320 r3351 792 792 msg = "Use a Geospatial_data object or a mesh origin. Not both." 793 793 assert geo_reference == None, msg 794 794 return points 795 795 else: 796 796 points = ensure_numeric(points, Float) … … 804 804 geo_reference[1], 805 805 geo_reference[2]) 806 806 points = Geospatial_data(data_points=points, geo_reference=geo) 807 807 return points 808 808 -
inundation/geospatial_data/test_geospatial_data.py
r3302 r3351 1073 1073 [2.0, 0.0],[2.0, 2.0], 1074 1074 [1.0, 3.0],[2.0, 2.0]] 1075 new_points = ensure_ absolute(points)1076 1077 assert allclose(new_points , points)1075 new_points = ensure_geospatial(points) 1076 1077 assert allclose(new_points.get_data_points(absolute = True), points) 1078 1078 1079 1079 points = array([[2.0, 0.0],[1.0, 1.0], 1080 1080 [2.0, 0.0],[2.0, 2.0], 1081 1081 [1.0, 3.0],[2.0, 2.0]]) 1082 new_points = ensure_ absolute(points)1083 1084 assert allclose(new_points , points)1082 new_points = ensure_geospatial(points) 1083 1084 assert allclose(new_points.get_data_points(absolute = True), points) 1085 1085 1086 1086 ab_points = array([[2.0, 0.0],[1.0, 1.0], … … 1345 1345 if __name__ == "__main__": 1346 1346 1347 #suite = unittest.makeSuite(Test_Geospatial_data, 'test_ lat_long')1347 #suite = unittest.makeSuite(Test_Geospatial_data, 'test_ensure_geospatial') 1348 1348 suite = unittest.makeSuite(Test_Geospatial_data, 'test') 1349 1349 runner = unittest.TextTestRunner()
Note: See TracChangeset
for help on using the changeset viewer.