Index: /issm/trunk-jpl/src/m/exp/exp2shp.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/exp2shp.m	(revision 24293)
+++ /issm/trunk-jpl/src/m/exp/exp2shp.m	(revision 24294)
@@ -26,15 +26,26 @@
 
 %initialize number of profile
-count=0;
+count=1;
 
 contours=struct([]);
 for i=1:length(shp),
 	if nargin < 3
-		if length(shp(1).x) == 1
+
+		%TEMP
+		%if contains(shp(i).name,'_pointcloud');
+		%	continue;
+		%end
+
+		if length(shp(i).x) == 0
+			continue;
+		elseif contains(shp(i).name,'_pointcloud');
+			geometry = 'MultiPoint';
+			shp(i).name = erase(shp(i).name,'_pointcloud');
+		elseif length(shp(i).x) == 1
 			geometry = 'Point';
-		elseif length(shp(1).x) < 3
+		elseif length(shp(i).x) < 3
 			geometry = 'Line';
 		else 
-			if (shp(1).x(end)==shp(1).x(1) && shp(1).y(end)==shp(1).y(1)),
+			if (shp(i).x(end)==shp(i).x(1) && shp(i).y(end)==shp(i).y(1)),
 				geometry = 'Polygon';
 			else
@@ -43,9 +54,12 @@
 		end
 	end
-	contours(i).Geometry=geometry;
-	contours(i).id=i;
-	contours(i).X=shp(i).x;
-	contours(i).Y=shp(i).y;
+	contours(count).Geometry=geometry;
+	contours(count).id=i;
+	contours(count).Name=shp(i).name;
+	contours(count).X=shp(i).x;
+	contours(count).Y=shp(i).y;
+	count = count+1;
 end
-	
+
+%Make sure it is one single geometry otherwise it will yell at you
 shapewrite(contours,shpfilename);
