Index: /trunk/anuga_core/documentation/user_manual/demos/buildings.py
===================================================================
--- /trunk/anuga_core/documentation/user_manual/demos/buildings.py	(revision 8009)
+++ /trunk/anuga_core/documentation/user_manual/demos/buildings.py	(revision 8010)
@@ -30,4 +30,5 @@
 # Create the "world" as a long, skinny channel
 boundary_poly = poly_from_box(0, length, 0, width)
+boundary_tags = {'left': [0], 'bottom': [1], 'right': [2], 'top': [3]}
 
 # Place 3 buildings downstream
@@ -36,16 +37,12 @@
                     poly_from_box(35, 40, 3.5, 8.5)]        # downstream box
 					
-building_tags = [ { 'upstream'   : [0,1,2,3]},
-                  { 'middle'     : None},
-		  { 'downstream' : [0,1,2,3]} ]
+building_tags = [ { 'upstream'   : [1]},    # Set segment[0], default others
+                  None,                     # Use default interior tag
+		  { 'downstream' : [0,1]} ] # set segments[0,1],default others
 
-#building_tags = None
 
 # create a domain mesh, with 3 building holes in it
 domain = anuga.create_domain_from_regions(boundary_poly,
-                                            boundary_tags={'left': [0],
-                                                   'bottom': [1],
-                                                   'right': [2],
-                                                   'top': [3]},
+                                            boundary_tags=boundary_tags,
                                             maximum_triangle_area = resolution,
                                             mesh_filename = 'building.msh',
@@ -76,8 +73,10 @@
 Bo = anuga.Dirichlet_boundary([-5, 0, 0])    # Outflow
 
+print domain.get_boundary_tags()
+
 domain.set_boundary({'left': Bi, 'right': Bo, 'top': Br, 'bottom': Br,
-                        'middle': Br      , # this is the internal middle building boundary
-			'downstream' : Br , # downstream building
-			'upstream' : Br     # upstream building boundary
+                     'interior': Br      ,# default interior boundary tag
+		     'downstream': Br    ,# downstream building
+		     'upstream' : Br      # upstream building boundary
                     })
 
@@ -88,4 +87,5 @@
 for t in domain.evolve(yieldstep=0.2, finaltime=15.0):
     print domain.timestepping_statistics()
+
     
 # now turn off the tap
@@ -94,2 +94,3 @@
 for t in domain.evolve(yieldstep=0.1, finaltime=30.0):
     print domain.timestepping_statistics()        
+
Index: /trunk/anuga_core/source/anuga/pmesh/mesh.py
===================================================================
--- /trunk/anuga_core/source/anuga/pmesh/mesh.py	(revision 8009)
+++ /trunk/anuga_core/source/anuga/pmesh/mesh.py	(revision 8010)
@@ -737,5 +737,6 @@
             segments.append( [lo, hi] ) 
         region_dict['segments'] = segments
-        region_dict['segment_tags'] = self._tag_dict2list(segment_tags, N)
+        region_dict['segment_tags'] = self._tag_dict2list(segment_tags, N,
+                                                          hole=hole)
        
     
@@ -757,5 +758,5 @@
         return inner
 
-    def _tag_dict2list(self, tags, number_of_segs):
+    def _tag_dict2list(self, tags, number_of_segs, hole=False):
         """
         Convert a tag dictionary from this sort of format;
@@ -771,5 +772,10 @@
         # Due to this default this method is too connected to
         # _add_area_from_polygon
-        segment_tags = ['']*number_of_segs
+
+        if hole:
+            default_tag ='interior'
+        else:
+            default_tag =''
+        segment_tags = [default_tag]*number_of_segs
         if tags is not None:
             for key in tags:
Index: /trunk/anuga_core/source/anuga/pmesh/mesh_interface.py
===================================================================
--- /trunk/anuga_core/source/anuga/pmesh/mesh_interface.py	(revision 8009)
+++ /trunk/anuga_core/source/anuga/pmesh/mesh_interface.py	(revision 8010)
@@ -318,5 +318,5 @@
                 tags = hole_tags[n]
             except:
-                tags = None
+                tags = {}
             m.add_hole_from_polygon(polygon,
                                     segment_tags=tags,
Index: /trunk/anuga_core/source/anuga/pmesh/test_mesh.py
===================================================================
--- /trunk/anuga_core/source/anuga/pmesh/test_mesh.py	(revision 8009)
+++ /trunk/anuga_core/source/anuga/pmesh/test_mesh.py	(revision 8010)
@@ -1757,5 +1757,5 @@
         self.failUnless(segs[2].tag=='bom',
                         'FAILED!') 
-        self.failUnless(segs[3].tag=='',
+        self.failUnless(segs[3].tag=='interior',
                         'FAILED!')
         verts = m.getUserVertices()
@@ -1775,4 +1775,66 @@
             self.failUnless(point_x == new_point_x, ' failed')
             self.failUnless(point_y == new_point_y, ' failed')
+
+
+
+
+    def test_add_hole_from_polygon_none_tag(self):
+        x=-500
+        y=-1000
+        m=Mesh(geo_reference=Geo_reference(56,x,y))
+
+        # These are the absolute values
+        polygon_absolute = [[0,0],[1,0],[1,1],[0,1]]
+        
+        x_p = -10
+        y_p = -40
+        geo_ref_poly = Geo_reference(56, x_p, y_p)
+        polygon = geo_ref_poly.change_points_geo_ref(polygon_absolute)
+        
+        poly_point = m.add_hole_from_polygon(polygon,
+                                               None,
+                                               geo_reference=geo_ref_poly)
+        # poly_point values are relative to the mesh geo-ref
+        # make them absolute
+        #print "poly_point.x+x",poly_point.x+x
+        #print "poly_point.y+y",poly_point.y+y
+        #print "polygon_absolute", polygon_absolute 
+        self.failUnless(is_inside_polygon([poly_point.x+x,poly_point.y+y],
+                                       polygon_absolute, closed = False),
+                        'FAILED!')
+               
+        self.failUnless(len(m.holes)==1,
+                        'FAILED!')
+        segs = m.getUserSegments()
+        self.failUnless(len(segs)==4,
+                        'FAILED!')
+        self.failUnless(len(m.userVertices)==4,
+                        'FAILED!')
+        
+        self.failUnless(segs[0].tag=='interior',
+                        'FAILED!')  
+        self.failUnless(segs[1].tag=='interior',
+                        'FAILED!') 
+         
+        self.failUnless(segs[2].tag=='interior',
+                        'FAILED!') 
+        self.failUnless(segs[3].tag=='interior',
+                        'FAILED!')
+        verts = m.getUserVertices()
+        #print "User verts",verts
+        #print 'polygon',polygon
+        #vert values are relative
+        for point,new_point in map(None,polygon,verts):
+            point_x = point[0] + geo_ref_poly.get_xllcorner()
+            new_point_x = new_point.x + m.geo_reference.get_xllcorner()
+            point_y = point[1] + geo_ref_poly.get_yllcorner()
+            #print "new_point.y",new_point.y
+            #print "m.geo_ref.get_yllcorner()",m.geo_reference.get_yllcorner() 
+            new_point_y = new_point.y + m.geo_reference.get_yllcorner()
+            #print "point_y",point_y
+            #print "new_point_y",new_point_y 
+            
+            self.failUnless(point_x == new_point_x, ' failed')
+            self.failUnless(point_y == new_point_y, ' failed')            
 
     def test_add_circle(self):
