Index: /anuga_core/source/anuga/shallow_water/data_manager.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 5462)
+++ /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 5463)
@@ -5061,8 +5061,9 @@
             raise Exception, msg
 
-        reference_header = 'index, longitude, latitude\n'.split(',')
+        reference_header = 'index, longitude, latitude\n'
+        reference_header_split = reference_header.split(',')
         for i in range(3):
-            if not file_header[i] == reference_header[i]:
-                msg = 'File must contain header\n'+header+'\n'
+            if not file_header[i] == reference_header_split[i]:
+                msg = 'File must contain header: '+reference_header+'\n'
                 raise Exception, msg
 
@@ -5181,34 +5182,15 @@
     outfile.close()
 
-def create_sts_boundary(order_file,stsname,lat_long=True):
+def create_sts_boundary(stsname):
     """
         Create boundary segments from .sts file. Points can be stored in
     arbitrary order within the .sts file. The order in which the .sts points
     make up the boundary are given in order.txt file
-    """
-    
-    if not order_file[-3:] == 'txt':
-        msg = 'Order file must be a txt file'
-        raise Exception, msg
-
-    try:
-        fid=open(order_file,'r')
-        file_header=fid.readline()
-        lines=fid.readlines()
-        fid.close()
-    except:
-        msg = 'Cannot open %s'%filename
-        raise msg
-
-    header="index,longitude,latitude\n"
-
-    if not file_header==header:
-        msg = 'File must contain header\n'+header+"\n"
-        raise Exception, msg
-
-    if len(lines)<2:
-        msg = 'File must contain at least two points'
-        raise Exception, msg
-
+    
+    FIXME:
+    Point coordinates are stored in relative eastings and northings. 
+    But boundary is produced in absolute coordinates
+    
+    """
     try:
         fid = NetCDFFile(stsname+'.sts', 'r')
@@ -5229,30 +5211,5 @@
     sts_points = concatenate((x,y), axis=1)
 
-    xllcorner = fid.xllcorner[0]
-    yllcorner = fid.yllcorner[0]
-
-    # Walk through ordering file
-    boundary_polygon=[]
-    for line in lines:
-        fields = line.split(',')
-        index=int(fields[0])
-        if lat_long:
-            zone,easting,northing=redfearn(float(fields[1]),float(fields[2]))
-            if not zone == fid.zone[0]:
-                msg = 'Inconsistent zones'
-                raise Exception, msg
-        else:
-            easting = float(fields[1])
-            northing = float(fields[2])
-            
-        if not allclose(array([easting,northing]),sts_points[index]):
-            msg = "Points in sts file do not match those in the"+\
-                ".txt file specifying the order of the boundary points"
-            raise Exception, msg
-        boundary_polygon.append(sts_points[index].tolist())
-
-    fid.close()
-    
-    return boundary_polygon
+    return sts_points.tolist()
 
 class Write_sww:
Index: /anuga_core/source/anuga/shallow_water/test_data_manager.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/test_data_manager.py	(revision 5462)
+++ /anuga_core/source/anuga/shallow_water/test_data_manager.py	(revision 5463)
@@ -6937,18 +6937,21 @@
         fid=open(order_file,'w')
         #Write Header
-        header="index,longitude,latitude\n"
+        header='index, longitude, latitude\n'
         fid.write(header)
         indices=[3,0,1]
         for i in indices:
-            line=str(i)+d+str(lat_long_points[i][0])+d+\
-                str(lat_long_points[i][1])+"\n"
+            line=str(i)+d+str(lat_long_points[i][1])+d+\
+                str(lat_long_points[i][0])+"\n"
             fid.write(line)
         fid.close()
 
         sts_file=base_name
-        urs2sts(base_name,sts_file,mean_stage=tide,verbose=False)
+        urs2sts(base_name, basename_out=sts_file,
+                ordering_filename=order_file,
+                mean_stage=tide,
+                verbose=False)
         self.delete_mux(files)
 
-        boundary_polygon = create_sts_boundary(order_file,base_name)
+        boundary_polygon = create_sts_boundary(base_name)
 
         os.remove(order_file)
