Index: /issm/trunk-jpl/src/m/shp/shp2exp.m
===================================================================
--- /issm/trunk-jpl/src/m/shp/shp2exp.m	(revision 26630)
+++ /issm/trunk-jpl/src/m/shp/shp2exp.m	(revision 26631)
@@ -48,17 +48,28 @@
 	elseif strcmpi(shp(i).Geometry,'Point'),
 		x=shp(i).X; y=shp(i).Y;
-		expstruct(end+1).x=x;
-		expstruct(end).y=y;
-		expstruct(end).nods=length(x);
-		expstruct(end).density=1;
-		expstruct(end).closed=0;
-		%exp(end).name=num2str(shp(i).id);
+		if ~isnan(x) && ~isnan(y)
+			expstruct(end+1).x=x;
+			expstruct(end).y=y;
+			expstruct(end).nods=length(x);
+			expstruct(end).density=1;
+			expstruct(end).closed=0;
+			%exp(end).name=num2str(shp(i).id);
+		end
+	elseif strcmpi(shp(i).Geometry,'PointZ'),
+		shp(i)
 	elseif strcmpi(shp(i).Geometry,'Line'),
-		x=shp(i).X; y=shp(i).Y;
-		expstruct(end+1).x=x;
-		expstruct(end).y=y;
-		expstruct(end).nods=length(x);
-		expstruct(end).density=1;
-		expstruct(end).closed=0;
+		x=shp(i).X(:); y=shp(i).Y(:);
+		pos = find(~isnan(x) & ~isnan(y));
+		idx=find(diff(pos)~=1);
+		A=[idx(1);diff(idx);numel(pos)-idx(end)];
+		Cx=mat2cell(x(pos),A,1);
+		Cy=mat2cell(y(pos),A,1);
+		for i=1:numel(Cx)
+			expstruct(end+1).x=Cx{i};
+			expstruct(end).y=Cy{i};
+			expstruct(end).nods=length(Cx{i});
+			expstruct(end).density=1;
+			expstruct(end).closed=0;
+		end
 	end
 end
