Index: sm/trunk-jpl/src/m/exp/Shp2Exp.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/Shp2Exp.m	(revision 16256)
+++ 	(revision )
@@ -1,33 +1,0 @@
-function Shp2Exp(expfilename,shapefilename)
-%SHP2EXP- transform shape file to Argus .exp file
-%
-%   Usage:
-%      Shp2Exp(expfilename,shapefilename);
-%
-%   Example:
-%      Shp2Exp('Domain.exp','Domain.shp');
-%
-%   See also EXPMASTER, EXPDOC
-
-	if ~exist(shapefilename,'file'),
-		error(['Shapefile ' shapefilename ' does not exist']);
-	end
-	shp=shaperead(shapefilename);
-
-	exp=struct([]);
-	for i=1:length(shp),
-		if strcmpi(shp(i).Geometry,'Polygon'),
-			x=shp(i).X; y=shp(i).Y;
-			ids=find(isnan(x));
-			x(ids)=[]; y(ids)=[];
-
-			exp(end+1).x=x;
-			exp(end).y=y;
-			exp(end).nods=length(x);
-			exp(end).density=1;
-			exp(end).closed=1;
-			exp(end).name=num2str(shp(i).id);
-		end
-	end
-
-	expwrite(exp,expfilename);
Index: /issm/trunk-jpl/src/m/shp/Shp2Exp.m
===================================================================
--- /issm/trunk-jpl/src/m/shp/Shp2Exp.m	(revision 16257)
+++ /issm/trunk-jpl/src/m/shp/Shp2Exp.m	(revision 16257)
@@ -0,0 +1,33 @@
+function Shp2Exp(expfilename,shapefilename)
+%SHP2EXP- transform shape file to Argus .exp file
+%
+%   Usage:
+%      Shp2Exp(expfilename,shapefilename);
+%
+%   Example:
+%      Shp2Exp('Domain.exp','Domain.shp');
+%
+%   See also EXPMASTER, EXPDOC
+
+	if ~exist(shapefilename,'file'),
+		error(['Shapefile ' shapefilename ' does not exist']);
+	end
+	shp=shaperead(shapefilename);
+
+	exp=struct([]);
+	for i=1:length(shp),
+		if strcmpi(shp(i).Geometry,'Polygon'),
+			x=shp(i).X; y=shp(i).Y;
+			ids=find(isnan(x));
+			x(ids)=[]; y(ids)=[];
+
+			exp(end+1).x=x;
+			exp(end).y=y;
+			exp(end).nods=length(x);
+			exp(end).density=1;
+			exp(end).closed=1;
+			exp(end).name=num2str(shp(i).id);
+		end
+	end
+
+	expwrite(exp,expfilename);
Index: /issm/trunk-jpl/src/m/shp/shpdisp.m
===================================================================
--- /issm/trunk-jpl/src/m/shp/shpdisp.m	(revision 16257)
+++ /issm/trunk-jpl/src/m/shp/shpdisp.m	(revision 16257)
@@ -0,0 +1,52 @@
+function shpdisp(domainoutline,varargin)
+%SHPDISP - plot the contours of a domain outline file
+%
+%   This routine reads in a domain outline file (Shape format) and plots all the contours 
+%
+%   Usage:
+%      shpdisp(domainoutline,varargin)
+%      shpdisp(domainoutline,figurenumber,linestyle,linewidth,unitmultiplier)
+%
+%   Example:
+%      shpdisp('Domain.shp',1,'--r',2,10^3);
+%
+%   See also SHPREAD, SHPDOC
+
+%check nargin
+if ~nargin | nargin>5
+	help shpdisp
+	error('shpdisp error message: bad usage');
+end
+
+%parse input
+if nargin<=1,
+	figurenumber=1;
+else
+	figurenumber=varargin{1};
+end
+if nargin<=2
+	linestyle='r-';
+else
+	linestyle=varargin{2};
+end
+if nargin<=3
+	linewidth=1;
+else
+	linewidth=varargin{3};
+end
+if nargin<=4
+	unitmultiplier=1;
+else
+	unitmultiplier=varargin{4}; if isnan(unitmultiplier), unitmultiplier=1; end
+end
+
+domain=shpread(domainoutline);
+
+figure(figurenumber),hold on
+for i=1:length(domain),
+	if (isnumeric(linestyle))
+		plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'Color',linestyle,'linewidth',linewidth);
+	else
+		plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,linestyle,'linewidth',linewidth);
+	end
+end
Index: /issm/trunk-jpl/src/m/shp/shpread.m
===================================================================
--- /issm/trunk-jpl/src/m/shp/shpread.m	(revision 16257)
+++ /issm/trunk-jpl/src/m/shp/shpread.m	(revision 16257)
@@ -0,0 +1,46 @@
+function Struct=shpread(filename)
+%SHPREAD - read a shape file and build a Structure
+%
+%   This routine reads a shape file .shp and builds a Structure containing the 
+%   fields x and y corresponding to the coordinates, one for the filename of
+%   the shp file, for the density, for the nodes, and a field closed to 
+%   indicate if the domain is closed. 
+%   The first argument is the .shp file to be read and the second one (optional) 
+%   indicates if the last point shall be read (1 to read it, 0 not to).
+%
+%   Usage:
+%      Struct=shpread(filename)
+%
+%   Example:
+%      Struct=shpread('domainoutline.shp')
+%
+%   See also EXPDOC, EXPWRITEASVERTICES
+
+%some checks
+if ~exist(filename),
+	error(['shpread error message: file ' filename ' not found!']);
+end
+
+%initialize number of profile
+count=0;
+
+%read shapefile
+shp=shaperead(filename);
+
+Struct=struct([]);
+for i=1:length(shp),
+	if strcmpi(shp(i).Geometry,'Polygon'),
+		x=shp(i).X; y=shp(i).Y;
+		ids=find(isnan(x));
+		x(ids)=[]; y(ids)=[];
+
+		Struct(end+1).x=x;
+		Struct(end).y=y;
+		Struct(end).nods=length(x);
+		Struct(end).density=1;
+		Struct(end).closed=1;
+		Struct(end).name=num2str(shp(i).id);
+	end
+end
+
+end
