Index: /inundation/pmesh/compile.py
===================================================================
--- /inundation/pmesh/compile.py	(revision 3493)
+++ /inundation/pmesh/compile.py	(revision 3494)
@@ -229,53 +229,4 @@
     raise 'Could not link %s - please try manually' %root1
     
-
-def can_use_C_extension(filename):
-    """Determine whether specified C-extension
-    can and should be used.
-    """
-
-    from config import use_extensions
-
-    from os.path import splitext
-
-    root, ext = splitext(filename)
-    
-    C=False
-    if use_extensions:
-        try:
-            s = 'import %s' %root
-            #print s
-            exec(s)
-        except:
-            try:
-                open(filename)
-            except:
-                msg = 'C extension %s cannot be opened' %filename
-                print msg                
-            else:    
-                print '------- Trying to compile c-extension %s' %filename
-	    
-                try:
-                    compile(filename)
-                except:
-                    print 'WARNING: Could not compile C-extension %s'\
-                          %filename
-                else:
-                    try:
-                        exec('import %s' %root)
-                    except:
-                        msg = 'C extension %s seems to compile OK, '
-                        msg += 'but it can still not be imported.'
-                        raise msg
-                    else:
-                        C=True
-        else:
-            C=True
-            
-    if not C:
-        pass
-        print 'NOTICE: C-extension %s not used' %filename
-
-    return C
 
 
Index: undation/pmesh/create_gong.py
===================================================================
--- /inundation/pmesh/create_gong.py	(revision 3493)
+++ 	(revision )
@@ -1,78 +1,0 @@
-
-import os, sys
-sys.path.append('..')
-
-from mesh import *
-from coordinate_transforms.geo_reference import Geo_reference
-
-#-------------------------------------------------------------
-if __name__ == "__main__":
-
-
-    bellambi_northing = 6195000.0
-    north_beach_northing = 6183000.0
-    north_beach_easting = 308500
-    border = 12000.0
-    west = 301000.0 # From the map 
-    inner_east = 310000.0 # From the map 
-    inner_west_south = 303000.0 # From the map 
-    inner_west_north = 307000.0  # From the map 
-    east = 328421.0
-    sea_boundary = (east+inner_east)/2
-    inner_center_easting =  ( inner_east +inner_west_north)/2
-    inner_center_northing = (bellambi_northing + north_beach_northing)/2
-
-    # from 100m dem
-    geo = Geo_reference(xllcorner = inner_center_easting,
-                        yllcorner = inner_center_northing,
-                        zone = 56)
-    print "***********************"
-    print "geo ref", geo
-    print "***********************"
-    
-    m = Mesh(geo_reference=geo)
-    
-    factor = 1000 #low res 10000, high res 1000
-    
-    poly = [[west, north_beach_northing - border],  #sw
-                         [west, bellambi_northing + border],  #nw
-                         [sea_boundary,
-                          bellambi_northing + border],  #n_sea_boundary
-                         [east, bellambi_northing + border], #ne
-                         [east, north_beach_northing - border],    #se
-                         [sea_boundary,
-                          north_beach_northing - border]    #s_sea_boundary
-                         ]
-    tags = {'wall':[0,1,2,3,4,5]}
-
-    m.add_region_from_polygon(poly, tags, max_triangle_area=factor*1000)
-    poly =  [
-        [inner_west_south,north_beach_northing], #sw
-        [inner_west_north,bellambi_northing],   #nw
-        [inner_east,bellambi_northing], #ne
-        [inner_east,north_beach_northing] #se
-        ]
-    m.add_region_from_polygon(poly, max_triangle_area=factor*100)
-    
-
-    #Even more inner points
-    flagstaff_x = 308000
-    flagstaff_y = 6189000
-    west_x = 305000
-    west_y = 6185000
-    
-    north_beach_northing = 6183000.0
-    
-    poly = [
-                         [flagstaff_x,flagstaff_y], #n
-                         [west_x,west_y],   #w
-                         [north_beach_easting,north_beach_northing], #s
-                         ]
-    m.add_region_from_polygon(poly, max_triangle_area=factor*10)
-    
-    #m.generateMesh()
-    m.generateMesh("pzq28.0za1000000a") 
-    
-    m.export_mesh_file("wollongong_4regions.msh")
-    #m.export_mesh_file("wollongong_highres_a28.tsh")
-    
Index: undation/pmesh/create_mesh.py
===================================================================
--- /inundation/pmesh/create_mesh.py	(revision 3493)
+++ 	(revision )
@@ -1,187 +1,0 @@
-"""Create mesh for lwru2 validation of the Oshiri island tsunami
-"""
-
-# Assume that the root AnuGA dir (inundation) is included in your pythonpath
-
-from coordinate_transforms.redfearn import redfearn
-
-def convert_points_from_latlon_to_utm(polygon, refzone=None):
-    points = []
-    for point in polygon:
-        zone, easting, northing  = redfearn(point[0], point[1])
-        #FIXME: Use point.latitude etc once we have a proper point set
-
-        if refzone is None:
-            refzone = zone
-        else:
-            assert zone == refzone
-        
-        points.append([easting, northing])
-
-    return points, zone    
-
-
-
-
-def create_region(polygon, tags, refzone):
-    """Create dictionary representation of region bounded by given polygon for use with pmesh
-    """
-
-
-    #
-    dict = {}
-    dict['points'] = polygon
-
-    #Create segments
-    #E.g. [[0,1], [1,2], [2,3], [3,0]]
-    segments = []
-    N = len(polygon)
-    for i in range(N):
-        lo = i
-        hi = (lo + 1) % N
-        segments.append( [lo, hi] ) 
-        
-        
-    dict['segments'] = segments
-
-
-    #Create tags
-    #E.g. ['wall', 'wall', 'ocean', 'wall']
-
-    if tags is not None:
-        segment_tags = [0]*N
-        for key in tags:
-            indices = tags[key]
-            for i in indices:
-                segment_tags[i] = key
-    
-        dict['segment_tags'] = segment_tags
-
-
-
-    return dict
-
-
-
-def create_mesh_from_regions(bounding_polygon,
-                             boundary_tags,
-                             resolution,
-                             filename = None,
-                             interior_regions = None,
-                             UTM = False,
-                             refzone = None):
-    """Create mesh from bounding polygon, tags for all segments and resolution.
-
-    Polygon is a list of points in latitude and longitudes - decimal degrees
-
-    Boundary tags is a dictionary of symbolic tags. For every tag there is a list of
-    indices referring to segments associated with that tag
-
-    FIXME (Howard): Not clear what the keys and values of the dictionary are.
-
-    Resolution is the maximal area per triangle for the bounding polygon
-    (excluding interior regions, see later)
-
-    Interior_regions is a list of tuples consisting of (polygon, resolution)
-    for each region to be separately refined.
-
-    This function does not allow segments to share points - use underlying
-    pmesh functionality for that
-
-    FIXME - FUTURE. Something like this.
-      Use class Point_set
-
-      Accept deg, min, sec, e.g.
-      [ [(-20,30,55), (116, 20, 00)], ...]
-
-
-
-    
-    """
-    print "OBSOLETE - USE MESH_INTERFACE.PY"
-    from mesh import Mesh
-    from coordinate_transforms.redfearn import redfearn
-    from utilities.polygon import populate_polygon
-    from utilities.numerical_tools import ensure_numeric
-    from coordinate_transforms.geo_reference import Geo_reference
-
-
-    bounding_polygon = ensure_numeric(bounding_polygon)
-    #print 'refzone', refzone
-
-    #Convert to UTM
-    if not UTM:
-        bounding_polygon, refzone = convert_points_from_latlon_to_utm(bounding_polygon)
-    else:
-       assert refzone is not None, 'Refzone must be specified, got %s' %refzone  
-
-
-    #FIXME: Must give georeference here.
-    #Why can't Mesh work out the ll corners?
-
-    xllcorner = min(bounding_polygon[:,0])
-    yllcorner = min(bounding_polygon[:,1])    
-    
-    geo = Geo_reference(xllcorner = xllcorner,
-                        yllcorner = yllcorner,
-                        zone = refzone)
-
-    print 'geo reference derived from bounding polygon', geo
-    m = Mesh(geo_reference=geo)
-    
-    
-    
-    #Do bounding polygon
-    region_dict = create_region(bounding_polygon, boundary_tags, refzone)    
-    m.addVertsSegs(region_dict)
-
-
-    #Find one point inside region automatically
-    if interior_regions is not None:
-        excluded_polygons = []        
-        for P, res in interior_regions:
-            if not UTM:            
-                polygon, _ = convert_points_from_latlon_to_utm(P, refzone)
-            else:
-                polygon = P
-            excluded_polygons.append( polygon )
-    else:
-        excluded_polygons = None
-
-    from Numeric import array
-    
-    [inner_point] = populate_polygon(bounding_polygon, 1, exclude = excluded_polygons)
-    print 'I:', inner_point, resolution
-    inner = m.addRegionEN(inner_point[0], inner_point[1])
-    inner.setMaxArea(resolution)
-
-
-
-    #Do interior regions
-    if interior_regions is not None:    
-        for P, res in interior_regions:
-            if not UTM:                        
-                polygon, _ = convert_points_from_latlon_to_utm(P, refzone)
-            else:
-                polygon = P
-                
-            region_dict = create_region(polygon, None, refzone)
-
-            m.addVertsSegs(region_dict)
-
-            [inner_point] = populate_polygon(polygon, 1)
-            print 'I', inner_point, res
-            X = m.addRegionEN(inner_point[0], inner_point[1])
-            X.setMaxArea(res)
-            
-
-    
-    m.generateMesh('pzq28.0za1000000a')
-    
-    m.export_mesh_file(filename)
-    
-
-
-
-
-    
