Index: /inundation/pyvolution/least_squares.py
===================================================================
--- /inundation/pyvolution/least_squares.py	(revision 1890)
+++ /inundation/pyvolution/least_squares.py	(revision 1891)
@@ -279,4 +279,5 @@
                  verbose = False,
                  expand_search = True,
+                 interp_only = False,
                  max_points_per_cell = 30,
                  mesh_origin = None,
@@ -345,6 +346,18 @@
             self.alpha = alpha
 
+
+        if point_coordinates is not None:
+            if verbose: print 'Building interpolation matrix'
+            self.build_interpolation_matrix_A(point_coordinates,
+                                              verbose = verbose,
+                                              expand_search = expand_search,
+                                              interp_only = interp_only, 
+                                              max_points_per_cell =\
+                                              max_points_per_cell,
+                                              data_origin = data_origin,
+                                              precrop = precrop)
         #Build coefficient matrices
-        self.build_coefficient_matrix_B(point_coordinates,
+        if interp_only == False:
+            self.build_coefficient_matrix_B(point_coordinates,
                                         verbose = verbose,
                                         expand_search = expand_search,
@@ -356,8 +369,16 @@
 
     def set_point_coordinates(self, point_coordinates,
-                              data_origin = None):
+                              data_origin = None,
+                              verbose = False,
+                              precrop = True):
         """
         A public interface to setting the point co-ordinates.
         """
+        if point_coordinates is not None:
+            if verbose: print 'Building interpolation matrix'
+            self.build_interpolation_matrix_A(point_coordinates,
+                                              verbose = verbose,
+                                              data_origin = data_origin,
+                                              precrop = precrop)
         self.build_coefficient_matrix_B(point_coordinates, data_origin)
 
@@ -375,14 +396,4 @@
 
         if point_coordinates is not None:
-
-            if verbose: print 'Building interpolation matrix'
-            self.build_interpolation_matrix_A(point_coordinates,
-                                              verbose = verbose,
-                                              expand_search = expand_search,
-                                              max_points_per_cell =\
-                                              max_points_per_cell,
-                                              data_origin = data_origin,
-                                              precrop = precrop)
-
             if self.alpha <> 0:
                 self.B = self.AtA + self.alpha*self.D
@@ -397,5 +408,6 @@
                                      max_points_per_cell=30,
                                      data_origin = None,
-                                     precrop = False):
+                                     precrop = False,
+                                     interp_only = False):
         """Build n x m interpolation matrix, where
         n is the number of data points and
@@ -556,5 +568,6 @@
                     self.A[i,j] = sigmas[j]
                     for k in js:
-                        self.AtA[j,k] += sigmas[j]*sigmas[k]
+                        if interp_only == False:
+                            self.AtA[j,k] += sigmas[j]*sigmas[k]
             else:
                 pass
Index: /inundation/pyvolution/test_data_manager.py
===================================================================
--- /inundation/pyvolution/test_data_manager.py	(revision 1890)
+++ /inundation/pyvolution/test_data_manager.py	(revision 1891)
@@ -2514,4 +2514,30 @@
         os.remove(root + '_100.dem')
 
+    def xxxtestz_sww2ers_real(self):
+        """Test that sww information can be converted correctly to asc/prj
+        format readable by e.g. ArcView
+        """
+
+        import time, os
+        from Numeric import array, zeros, allclose, Float, concatenate
+        from Scientific.IO.NetCDF import NetCDFFile
+
+	# the memory optimised least squares
+	#  cellsize = 20,   # this one seems to hang
+	#  cellsize = 200000, # Ran 1 test in 269.703s
+				#Ran 1 test in 267.344s
+	#  cellsize = 20000,  # Ran 1 test in 460.922s
+	#  cellsize = 2000   #Ran 1 test in 5340.250s
+	#  cellsize = 200   #Ran 1 test in 
+
+	# not optimised
+	# seems to hang
+	#  cellsize = 2000   # Ran 1 test in 5334.563s
+        #Export to ascii/prj files
+        sww2dem('karratha_100m',
+                quantity = 'depth',
+                cellsize = 200000,
+                verbose = True)
+
 
 
@@ -2520,4 +2546,5 @@
 if __name__ == "__main__":
     suite = unittest.makeSuite(Test_Data_Manager,'test')
+    #suite = unittest.makeSuite(Test_Data_Manager,'xxxtest')
     #suite = unittest.makeSuite(Test_Data_Manager,'test_sww2dem_boundingbox')    
     #suite = unittest.makeSuite(Test_Data_Manager,'test_dem2pts_bounding_box')
Index: /inundation/pyvolution/test_least_squares.py
===================================================================
--- /inundation/pyvolution/test_least_squares.py	(revision 1890)
+++ /inundation/pyvolution/test_least_squares.py	(revision 1891)
@@ -490,4 +490,28 @@
 
 
+    def test_interpolate_attributes_to_points_interp_only(self):
+        v0 = [0.0, 0.0]
+        v1 = [0.0, 5.0]
+        v2 = [5.0, 0.0]
+
+        vertices = [v0, v1, v2]
+        triangles = [ [1,0,2] ]   #bac
+
+        d0 = [1.0, 1.0]
+        d1 = [1.0, 2.0]
+        d2 = [3.0, 1.0]
+        point_coords = [ d0, d1, d2]
+
+        interp = Interpolation(vertices, triangles, point_coords,
+                               interp_only = True)
+        
+        f = linear_function(vertices)
+        z = interp.interpolate(f)
+        answer = linear_function(point_coords)
+        #print "answer", answer
+        #print "z", z 
+
+        assert allclose(z, answer)
+
     def test_interpolate_attributes_to_pointsII(self):
         a = [-1.0, 0.0]
