Changeset 578 for inundation/ga/storm_surge/pmesh/load_mesh
- Timestamp:
- Nov 17, 2004, 3:28:09 PM (20 years ago)
- Location:
- inundation/ga/storm_surge/pmesh/load_mesh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py
r511 r578 411 411 raise IOError, msg 412 412 413 ## used by alpha shapes 414 415 def export_boundary_file( file_name, points, title, delimiter = ','): 416 """ 417 export a file, ofile, with the format 418 419 First line: Title variable 420 Following lines: [point index][delimiter][point index] 421 422 file_name - the name of the new file 423 points - List of point index pairs [[p1, p2],[p3, p4]..] 424 title - info to write in the first line 425 """ 426 427 fd = open(file_name,'w') 428 429 fd.write(title+"\n") 430 #[point index][delimiter][point index] 431 for point in points: 432 fd.write( str(point[0]) + delimiter 433 + str(point[1]) + "\n") 434 fd.close() 435 436 413 437 ### 414 438 # LOADING XYA FILES … … 423 447 try: 424 448 fd = open(ofile) 449 #print "ofile",ofile 425 450 xya_dic = read_xya_file(fd, delimiter) 426 451 fd.close() … … 510 535 + attlist + "\n") 511 536 fd.close() 512 537 513 538 if __name__ == "__main__": 514 539 m = import_mesh("tee.txt") -
inundation/ga/storm_surge/pmesh/load_mesh/loadASCIIHarness.py
r495 r578 4 4 #FIXME (Ole): I think we need a unit test of write_ASCII_trianglulation 5 5 # in order to quash bug in merimbula data 6 6 # - to quash the bug need a raised error in pyvolution for reading xya files 7 # when the title attribute information is not consistent with the data in the 8 # file - DSG 7 9 8 10 import sys
Note: See TracChangeset
for help on using the changeset viewer.