Index: /issm/trunk/src/m/kml/kml_part_edges.m
===================================================================
--- /issm/trunk/src/m/kml/kml_part_edges.m	(revision 6472)
+++ /issm/trunk/src/m/kml/kml_part_edges.m	(revision 6473)
@@ -128,5 +128,5 @@
 
         [icol,irow]=find(epart'==k);
-        if isempty(icol)
+        if isempty(irow)
             continue;
         end
Index: /issm/trunk/src/m/kml/kml_part_elems.m
===================================================================
--- /issm/trunk/src/m/kml/kml_part_elems.m	(revision 6472)
+++ /issm/trunk/src/m/kml/kml_part_elems.m	(revision 6473)
@@ -123,16 +123,12 @@
     for k=1:md.npart
 
-%  for each partition, find all the included elements and determine the
-%  perimeter (including those shared by another partition)
+%  for each partition, find all the included elements
 
         [icol,irow]=find(epart'==k);
-        if isempty(icol)
+        if isempty(irow)
             continue;
         end
         irow=unique(irow);
         elem=md.elements(irow,:);
-        nodecon=nodeconnectivity(elem,md.numberofgrids);
-        [edgeper,elemper,iloop]=edgeperimeter(elem,nodecon);
-        iloop(end+1)=size(edgeper,1)+1;
 
 %  determine the data to be used for the colors (if any)
@@ -155,9 +151,5 @@
 
         kplace=kml_placemark();
-        if (length(iloop)-1 > 1)
-            kplace.name      =sprintf('Partition %d (%d loops)',k,length(iloop)-1);
-        else
-            kplace.name      =sprintf('Partition %d',k);
-        end
+        kplace.name      =sprintf('Partition %d (%d elements)',k,size(elem,1));
         kplace.visibility=1;
         if exist('pdata','var')
@@ -176,9 +168,9 @@
 
         kmgeom=kml_multigeometry();
-        kmgeom.geometry  ={repmat(kml_polygon(),1,length(iloop)-1)};
-
-%  loop over each loop of the perimeter for the given partition
-
-        for i=1:length(iloop)-1
+        kmgeom.geometry  ={repmat(kml_polygon(),1,size(elem,1))};
+
+%  loop over each element for the given partition
+
+        for i=1:size(elem,1)
             kpoly=kml_polygon();
             kpoly.extrude   =1;
@@ -186,11 +178,11 @@
 
             kring=kml_linearring();
-            kring.coords    =zeros(iloop(i+1)-iloop(i)+1,3);
-
-%  loop over the element edges on the loop of the partition
-
-            for j=iloop(i):iloop(i+1)-1
-                [lat,long]=mapxy(md.x(edgeper(j,1)),md.y(edgeper(j,1)),'s');
-                kring.coords(j-iloop(i)+1,:)=[long lat alt];
+            kring.coords    =zeros(size(elem,2)+1,3);
+
+%  loop over the element nodes
+
+            for j=1:size(elem,2)
+                [lat,long]=mapxy(md.x(elem(i,j)),md.y(elem(i,j)),'s');
+                kring.coords(j,:)=[long lat alt];
             end
             kring.coords(end,:)=kring.coords(1,:);
Index: /issm/trunk/src/m/kml/kml_partitions.m
===================================================================
--- /issm/trunk/src/m/kml/kml_partitions.m	(revision 6472)
+++ /issm/trunk/src/m/kml/kml_partitions.m	(revision 6473)
@@ -129,5 +129,5 @@
 
         [icol,irow]=find(epart'==k);
-        if isempty(icol)
+        if isempty(irow)
             continue;
         end
