Index: /inundation/ga/storm_surge/pmesh/create_gong.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/create_gong.py	(revision 1073)
+++ /inundation/ga/storm_surge/pmesh/create_gong.py	(revision 1074)
@@ -68,6 +68,8 @@
     high = m.addRegionEN(inner_east-0.5,bellambi_northing-0.5)
     high.setMaxArea(5*factor) #doing 0.5, fac = 1000 gives degenerate error
-    m.generateMesh()
+    #m.generateMesh()
+    m.generateMesh("pzq28.0za1000000a") 
     
-    m.export_triangulation_file("wollongong_highres.msh")
+    m.export_mesh_file("wollongong_highres_a28.msh")
+    #m.export_mesh_file("wollongong_highres_a28.tsh")
     
Index: /inundation/ga/storm_surge/pmesh/mesh.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/mesh.py	(revision 1073)
+++ /inundation/ga/storm_surge/pmesh/mesh.py	(revision 1074)
@@ -1129,15 +1129,22 @@
         """
         Add out-line (user Mesh) attributes given a dictionary of the lists
-        point list: [(x1,y1),(x2,y2),...] (Tuples of doubles)  
-        segment list: [(point1,point2),(p3,p4),...] (Tuples of integers)
-        #segment tag list: [S1Tag, S2Tag, ...] (list of ints)
+        points: [(x1,y1),(x2,y2),...] (Tuples of doubles)  
+        segments: [(point1,point2),(p3,p4),...] (Tuples of integers)
+        segment_tags: [S1Tag, S2Tag, ...] (list of strings)
 
         Assume the values are in Eastings and Northings, with no reference
         point
         """
-
+        if not outlineDict.has_key('segment_tags'):
+            outlineDict['segment_tags'] = []
+            for i in range(len(outlineDict['segments'])):
+                outlineDict['segment_tags'].append('')
+        print "outlineDict['segment_tags']",outlineDict['segment_tags']
+        print "outlineDict['points']",outlineDict['points']
+        print "outlineDict['segments']",outlineDict['segments']
+        
         localUserVertices = []
         #index = 0
-        for point in outlineDict['pointlist']:
+        for point in outlineDict['points']:
             v=Vertex(point[0]-self.geo_reference.xllcorner,
                      point[1]-self.geo_reference.yllcorner)
@@ -1148,7 +1155,10 @@
             
         #index = 0
-        for seg in map(None,outlineDict['segmentlist']):
+        for seg,seg_tag in map(None,outlineDict['segments'],
+                       outlineDict['segment_tags']):
             segObject = Segment( localUserVertices[seg[0]],
                            localUserVertices[seg[1]] )
+            if not seg_tag == '':
+                segObject.set_tag(seg_tag)
             #segObject.index = index
             #index +=1
@@ -2250,6 +2260,6 @@
     #print "segments", segments
     ungenerated_dict = {}
-    ungenerated_dict['pointlist'] = points
-    ungenerated_dict['segmentlist'] = segments
+    ungenerated_dict['points'] = points
+    ungenerated_dict['segments'] = segments
     return ungenerated_dict
 
Index: /inundation/ga/storm_surge/pmesh/meshHarness.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/meshHarness.py	(revision 1073)
+++ /inundation/ga/storm_surge/pmesh/meshHarness.py	(revision 1074)
@@ -1093,12 +1093,30 @@
         m.addVertsSegs(dict)
 
-        # have to reset this , since it's a class attribute
-        Segment.set_default_tag("")
-            
         self.failUnless(len(m.userSegments) ==10,
                         'Wrong segment list length.')
         self.failUnless(len(m.userVertices) == 11,
                         'Wrong vertex list length.')
-
+        
+    def test_addVertsSegs(self):
+        m = Mesh()
+        Segment.set_default_tag("food")
+        dict = {}
+        dict['points'] = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
+        dict['segments'] = [[0, 1], [1, 2]]
+        dict['segment_tags'] = ['','do-op']
+        m.addVertsSegs(dict)
+        # have to reset this , since it's a class attribute
+        Segment.set_default_tag("")
+
+        
+        self.failUnless(len(m.userSegments) ==2,
+                        'Wrong segment list length.')
+        self.failUnless(len(m.userVertices) == 3,
+                        'Wrong vertex list length.')
+        self.failUnless(m.userSegments[0].tag =='food',
+                        'Wrong segment tag length.')
+        self.failUnless(m.userSegments[1].tag =='do-op',
+                        'Wrong segment tag.')
+        
     def test_exportASCIImeshfile(self):
     
@@ -1396,5 +1414,5 @@
 if __name__ == "__main__":
     suite = unittest.makeSuite(meshTestCase,'test')
-    #suite = unittest.makeSuite(meshTestCase,'test_import_mesh')
+    #suite = unittest.makeSuite(meshTestCase,'test_asciiFile')
     runner = unittest.TextTestRunner() #verbosity=2)
     runner.run(suite)
Index: /inundation/ga/storm_surge/pmesh/scripts/create_gong.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/scripts/create_gong.py	(revision 1073)
+++ /inundation/ga/storm_surge/pmesh/scripts/create_gong.py	(revision 1074)
@@ -1,6 +1,8 @@
 
+import os, sys
+sys.path.append('..')
 
+#problem, it's loading pyvolution mesh 1st!
 from mesh import *
-#from load_mesh.loadASCII import *
 from coordinate_transforms.geo_reference import Geo_reference
 
@@ -50,5 +52,5 @@
     m.addVertsSegs(dict)
 
-    factor = 1000
+    factor = 10000 #low res 10000, high res 1000
     low = m.addRegionEN(east-0.5, bellambi_northing + border-0.5)
     low.setMaxArea(100*factor)
@@ -59,5 +61,5 @@
     high = m.addRegionEN(inner_east-0.5,bellambi_northing-0.5)
     high.setMaxArea(1*factor)
-    #m.generateMesh()
+    m.generateMesh()
     
     m.export_triangulation_file("wollongong_outline.msh")
