Index: /issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpread.m
===================================================================
--- /issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpread.m	(revision 21368)
+++ /issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpread.m	(revision 21369)
@@ -1,3 +1,3 @@
-function Struct=shpread(filename)
+function Struct=shpread(filename,varargin)
 %SHPREAD - read a shape file and build a Structure
 %
@@ -18,4 +18,7 @@
 %
 %   See also EXPDOC, EXPWRITEASVERTICES
+
+%recover options
+options=pairoptions(varargin{:});
 
 %some checks
@@ -102,3 +105,11 @@
 end
 
+invert=getfieldvalue(options,'invert',0);
+if invert,
+	for i=1:length(Struct),
+		Struct(i).x=flipud(Struct(i).x);
+		Struct(i).y=flipud(Struct(i).y);
+	end
 end
+
+end
Index: /issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpwrite.m
===================================================================
--- /issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpwrite.m	(revision 21368)
+++ /issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpwrite.m	(revision 21369)
@@ -18,6 +18,8 @@
 	if strcmpi(shp(i).Geometry,'Point'),
 		contours(i).Geometry='Point';
-	else strcmpi(shp(i).Geometry,'Polygon'),
+	elseif strcmpi(shp(i).Geometry,'Polygon'),
 		contours(i).Geometry='Polygon';
+	elseif strcmpi(shp(i).Geometry,'Line'),
+		contours(i).Geometry='Line';
 	end
 	contours(i).id=i;
