Index: /issm/trunk-jpl/src/m/exp/exp2shp.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/exp2shp.m	(revision 18212)
+++ /issm/trunk-jpl/src/m/exp/exp2shp.m	(revision 18213)
@@ -1,10 +1,12 @@
-function exp2shp(shapefilename,expfilename)
+function exp2shp(shapefilename,expfilename,geometry)
 %SHPWRITE - write a shape file from a contour structure
 %
 %   Usage:
-%      exp2shp(shapefilename,expfilename)
+%      exp2shp(shapefilename,expfilename,geometry)
 %
 %   Example:
 %      exp2shp('domainoutline.shp','domainoutline.exp')
+%      exp2shp('domainoutline.shp','domainoutline.exp','Polygon')
+%      exp2shp('massfluxgate.shp','massfluxgate.exp','Line')
 %
 %   See also SHPREAD, SHPWRITE, SHP2EXP
@@ -17,5 +19,14 @@
 contours=struct([]);
 for i=1:length(shp),
-	contours(i).Geometry='Polygon';
+	if nargin < 3
+		if length(shp(1).x) == 1
+			geometry = 'Point';
+		elseif length(shp(1).x) < 3
+			geometry = 'Line';
+		else
+			geometry = 'Polygon';
+		end
+	end
+	contours(i).Geometry=geometry;
 	contours(i).id=i;
 	contours(i).X=shp(i).x;
