Changeset 1073
- Timestamp:
- Mar 14, 2005, 11:14:25 AM (20 years ago)
- Location:
- inundation/ga/storm_surge/pmesh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py
r1071 r1073 199 199 segmenttags.append(stringtag) 200 200 201 try:202 geo_reference = Geo_reference(ASCIIFile=fd)203 except:204 #geo_ref not compulsory205 geo_reference = None206 201 207 202 meshDict = {} … … 214 209 meshDict['segment_tags'] = segmenttags 215 210 meshDict['vertex_attribute_titles'] = vertTitle 216 meshDict['geo_reference'] = geo_reference211 217 212 return meshDict 218 213 … … 241 236 ######### loading the point info 242 237 line = fd.readline() 243 #print line238 #print 'read_outline - line',line 244 239 fragments = line.split() 245 240 #for fragment in fragments: … … 357 352 except IndexError, e: 358 353 regionmaxareas.append(None) 354 355 try: 356 geo_reference = Geo_reference(ASCIIFile=fd) 357 except: 358 #geo_ref not compulsory 359 geo_reference = None 359 360 360 361 meshDict = {} … … 367 368 meshDict['region_tags'] = regionattributes 368 369 meshDict['region_max_areas'] = regionmaxareas 370 meshDict['geo_reference'] = geo_reference 371 369 372 #print "meshDict",meshDict 370 373 return meshDict … … 485 488 + str(segment_tags[i]) + "\n") 486 489 487 # geo_reference info488 if gen_dict.has_key('geo_reference') and not gen_dict['geo_reference'] is None:489 gen_dict['geo_reference'].write_ASCII(fd)490 490 491 491 def export_mesh_file(ofile,mesh_dict): … … 611 611 fd.write(str(i) + " " + area + "\n") 612 612 613 # geo_reference info 614 if dict.has_key('geo_reference') and not dict['geo_reference'] is None: 615 dict['geo_reference'].write_ASCII(fd) 613 616 614 617 def write_msh_file(filename, mesh): -
inundation/ga/storm_surge/pmesh/meshHarness.py
r1034 r1073 720 720 721 721 r1 = Region(0.3, 0.3,tag = "1.3") 722 geo = Geo_reference( 8.9,8.9,65)722 geo = Geo_reference(65,8.9,8.9) 723 723 m = Mesh(userVertices=[a,d,f,e], 724 724 userSegments=[s1,s2,s3,s4],
Note: See TracChangeset
for help on using the changeset viewer.