Index: /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py	(revision 1020)
+++ /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py	(revision 1021)
@@ -1065,5 +1065,4 @@
     
     from Scientific.IO.NetCDF import NetCDFFile
-
     point_atts2array(point_atts)
     # NetCDF file definition
@@ -1089,5 +1088,5 @@
         outfile.createVariable(key, Float, ('number_of_points',))
         outfile.variables[key][:] = point_atts['attributelist'][key] #.astype(Float32)
-
+        
     if point_atts.has_key('geo_reference') and not point_atts['geo_reference'] == None:
         point_atts['geo_reference'].write_NetCDF(outfile)
@@ -1170,5 +1169,5 @@
     return xya_dict
 
-                
+#FIXME (DSG) need an export_points_file method..                
 def export_xya_file( file_name, xya_dict, title, delimiter = ','):
     """
Index: /inundation/ga/storm_surge/pmesh/load_mesh/test_loadASCII.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/load_mesh/test_loadASCII.py	(revision 1020)
+++ /inundation/ga/storm_surge/pmesh/load_mesh/test_loadASCII.py	(revision 1021)
@@ -429,9 +429,11 @@
 	att_dict['brightness'] = array([10.0, 0.0, 10.4])
         dict['attributelist'] = att_dict
-        dict['geo_reference'] = Geo_reference(1.9,1.9,'zone65')
+        dict['geo_reference'] = Geo_reference(1.9,1.9,65)
+        
         
         fileName = tempfile.mktemp(".pts")
         write_pts(fileName, dict)
         dict2 = load_points_file(fileName)
+        #print "fileName",fileName 
         os.remove(fileName)
         #print "dict2",dict2 
@@ -589,4 +591,5 @@
 
     suite = unittest.makeSuite(loadASCIITestCase,'test')
+    #suite = unittest.makeSuite(loadASCIITestCase,'test_writepts')
     runner = unittest.TextTestRunner() #verbosity=2)
     runner.run(suite)
Index: /inundation/ga/storm_surge/pmesh/mesh.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/mesh.py	(revision 1020)
+++ /inundation/ga/storm_surge/pmesh/mesh.py	(revision 1021)
@@ -459,9 +459,17 @@
                                 self.regions) 
     
-    def __init__(self, userSegments=None, userVertices=None, holes=None, regions=None):
+    def __init__(self,
+                 userSegments=None,
+                 userVertices=None,
+                 holes=None,
+                 regions=None,
+                 geo_reference=None):
         self.meshTriangles=[] 
         self.attributeTitles=[] 
         self.meshSegments=[]
         self.meshVertices=[]
+
+        #Peters stuff
+        # FIXME (DSG) Sets of what?  
         self.setID={}
         self.setID['None']=0
@@ -488,4 +496,10 @@
         else:
             self.regions=regions
+
+        if geo_reference is None:
+            self.geo_reference = None
+        else:
+            self.geo_reference = geo_reference
+            
     def __cmp__(self,other):
         
@@ -1665,5 +1679,5 @@
         """
         #load_mesh.loadASCII
-
+        #FIXME, this should be a mesh2io method
         if self.meshVertices == []:
             Vertices = self.userVertices
@@ -1689,4 +1703,5 @@
         xya_dict['pointlist'] = points
         xya_dict['pointattributelist'] = pointattributes
+        xya_dict['geo_reference'] = self.geo_reference
 
         load_mesh.loadASCII.export_xya_file(ofile, xya_dict, title, delimiter = " ")
@@ -1730,4 +1745,7 @@
         for element in dict_mesh.keys():
             dict[element] = dict_mesh[element]
+
+        # add the geo reference
+        dict['geo_reference'] = self.geo_reference
         return dict
     
@@ -2220,5 +2238,5 @@
 
 def importMeshFromFile(ofile):
-    """returns a mesh object, made from a .xya or .txh file
+    """returns a mesh object, made from a .xya/.pts or .tsh/.msh file
     Often raises SyntaxError, IOError
     """
@@ -2245,13 +2263,14 @@
         #print "loading " + ofile
         dict = load_mesh.loadASCII.load_points_file(ofile)
-        #print "dict",dict     
-        dict['segmentlist'] = []
-        dict['segmenttaglist'] = []
-        dict['regionlist'] = []
-        dict['regionattributelist'] = []
-        dict['regionmaxarealist'] = []
-        dict['holelist'] = [] 
-        newmesh= Mesh()
-        newmesh.setMesh(dict) #FIXME use IOOutline2Mesh
+        #print "dict",dict
+        dict['points'] = dict['pointlist']
+        dict['outline_segments'] = []
+        dict['outline_segment_tags'] = []
+        dict['regions'] = []
+        dict['region_tags'] = []
+        dict['region_max_areas'] = []
+        dict['holes'] = [] 
+        newmesh= Mesh(geo_reference = dict['geo_reference'])
+        newmesh.IOOutline2Mesh(dict) #FIXME use IOOutline2Mesh
         counter = newmesh.removeDuplicatedUserVertices()
         if (counter >0):
Index: /inundation/ga/storm_surge/pmesh/pmesh.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/pmesh.py	(revision 1020)
+++ /inundation/ga/storm_surge/pmesh/pmesh.py	(revision 1021)
@@ -138,4 +138,7 @@
         self.menuBar.addmenuitem('File', 'command', 'Normalise mesh for glutobj',
                                  label='Normalise mesh for glutobj', command=self.normalise4ObjMesh)
+        self.menuBar.addmenuitem('File', 'separator')
+        self.menuBar.addmenuitem('File', 'command', '',
+                                 label='Print geo reference', command=self.printGeoReference)
         self.menuBar.addmenuitem('File', 'separator')
         self.menuBar.addmenuitem('File', 'command', 'Exit program',
@@ -989,5 +992,10 @@
         seg = self.Segments.draw(v1,v2,self.mesh,self.uniqueID,self.SCALE,self.canvas,None)
         return seg
-
+    def printGeoReference(self):
+        try:
+            print "geo reference", self.mesh.geo_reference
+        except:
+            print "no geo reference"
+        
     def visualiseMesh(self,mesh):
         """
