Changeset 3266 for inundation/geospatial_data
- Timestamp:
- Jul 3, 2006, 11:07:07 AM (19 years ago)
- Location:
- inundation/geospatial_data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified inundation/geospatial_data/geospatial_data.py ¶
r3262 r3266 690 690 Inputed formats are; 691 691 points: List or numeric array of coordinate pairs [xi, eta] of 692 points or geospatial object 692 points or geospatial object or points file name 693 693 694 694 mesh_origin: A geo_reference object or 3-tuples consisting of -
TabularUnified inundation/geospatial_data/test_geospatial_data.py ¶
r3262 r3266 462 462 assert allclose(results.get_attributes(attribute_name='speed'), [0.0, 10.0, 40.0]) 463 463 464 def BADtest_loadxya4(self): 465 """ 466 comma delimited 467 """ 468 fileName = tempfile.mktemp(".xya") 469 file = open(fileName,"w") 470 file.write("elevation , speed \n\ 471 1.0, 0.0, splat, 0.0\n\ 472 0.0, 1.0, 0.0, 10.0\n\ 473 1.0, 0.0, 10.4, 40.0\n") 474 file.close() 475 results = Geospatial_data(fileName, delimiter=',') 476 os.remove(fileName) 477 # print 'data', results.get_data_points() 478 assert allclose(results.get_data_points(), [[1.0, 0.0],[0.0, 1.0],[1.0, 0.0]]) 479 assert allclose(results.get_attributes(attribute_name='elevation'), ["splat", 0.0, 10.4]) 480 assert allclose(results.get_attributes(attribute_name='speed'), [0.0, 10.0, 40.0]) 481 464 482 def test_read_write_points_file_bad2(self): 465 483 att_dict = {}
Note: See TracChangeset
for help on using the changeset viewer.