Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 16412)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 16413)
@@ -708,6 +708,4 @@
 			     ./modules/Kml2Expx/Kml2Expx.h\
 			     ./modules/Kml2Expx/Kml2Expx.cpp\
-			     ./modules/Shp2Expx/Shp2Expx.h\
-			     ./modules/Shp2Expx/Shp2Expx.cpp\
 			     ./modules/Shp2Kmlx/Shp2Kmlx.h\
 			     ./modules/Shp2Kmlx/Shp2Kmlx.cpp\
Index: /issm/trunk-jpl/src/c/modules/modules.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/modules.h	(revision 16412)
+++ /issm/trunk-jpl/src/c/modules/modules.h	(revision 16413)
@@ -86,5 +86,4 @@
 #include "./RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.h"
 #include "./Scotchx/Scotchx.h"
-#include "./Shp2Expx/Shp2Expx.h"
 #include "./Shp2Kmlx/Shp2Kmlx.h"
 #include "./SmbGradientsx/SmbGradientsx.h"
Index: /issm/trunk-jpl/src/wrappers/ShpRead/ShpRead.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/ShpRead/ShpRead.cpp	(revision 16413)
+++ /issm/trunk-jpl/src/wrappers/ShpRead/ShpRead.cpp	(revision 16413)
@@ -0,0 +1,94 @@
+/*\file ShpRead.c
+ *\brief: shp to exp file conversion mex module.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "./ShpRead.h"
+#ifdef _HAVE_SHAPELIB_ //only works if Shapelib library has been compiled in.
+#include "shapefil.h"
+#endif
+
+void ShpReadUsage(void){/*{{{*/
+	_printf0_("ShpRead - Read shapefile\n");
+	_printf0_("\n");
+	_printf0_("   This module reads shapefiles and converts them to matlab/python structures\n");
+	_printf0_("\n");
+	_printf0_("   Usage:\n");
+	_printf0_("      ShpRead(filename);\n");
+	_printf0_("      filexp      file name of exp file to be written\n");
+	_printf0_("\n");
+	_printf0_("   Examples:\n");
+	_printf0_("      ShpRead('file.shp');\n");
+}/*}}}*/
+WRAPPER(ShpRead){
+
+	/*input: */
+	char *filename= NULL;
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	#ifndef _HAVE_SHAPELIB_ //only works if shapelib library has been compiled in.
+	_error_("Shapelib not available! Cannot carry out shp file translation!");
+	#else
+
+	/*checks on arguments on the matlab side: */
+	if(nlhs > NLHS){
+		ShpReadUsage(); _error_("ShpRead usage error");
+	}
+	if(nrhs != NRHS){
+		ShpReadUsage(); _error_("ShpRead usage error");
+	}
+
+	/*Input datasets: */
+	FetchData(&filename,SHP_IN);
+
+	/*Intermediaries*/
+	int         nShapeType,nEntities;
+	IssmPDouble adfMinBound[4], adfMaxBound[4];
+
+	/*Open shapefile*/
+	SHPHandle hSHP = SHPOpen( filename, "rb" );
+	if(!hSHP) _error_("Error opening shp/shx files.");
+
+	/*read header and print out file bounds*/
+	SHPGetInfo( hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
+	_printf_("Shapefile Type: "<<SHPTypeName(nShapeType)<<"   number of Shapes: "<< nEntities<<"\n\n");
+
+	/*Initialize output*/
+	Contours* contours=new Contours();
+
+	/*Read all objects*/
+	for(int i=0; i<nEntities;i++ ){
+		SHPObject* psShape = SHPReadObject(hSHP,i);
+		_printf_( "Shape #"<<i<<" ("<<SHPTypeName(psShape->nSHPType)<<") nVertices="<<psShape->nVertices<<", nParts="<<psShape->nParts<<"\n");
+
+		Contour<double> *contour = NULL;
+
+		if(psShape->nSHPType==SHPT_ARC){
+			contour=new Contour<double>(0,psShape->nVertices,psShape->padfX,psShape->padfY,false);
+		}
+
+		/*Add to contours*/
+		if(contour) contours->AddObject(contour);
+
+		/*Destroy current shape*/
+		SHPDestroyObject( psShape );
+	}
+
+	/*Write output*/
+	//ExpWrite(contours,filexp);
+
+	/*Clean-up*/
+	delete contours;
+	xDelete<char>(filename);
+
+	#endif
+	/*end module: */
+	MODULEEND();
+}
Index: /issm/trunk-jpl/src/wrappers/ShpRead/ShpRead.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/ShpRead/ShpRead.h	(revision 16413)
+++ /issm/trunk-jpl/src/wrappers/ShpRead/ShpRead.h	(revision 16413)
@@ -0,0 +1,47 @@
+/*!\file ShpRead.h
+ * \brief: prototype for shp read mex module.
+ */
+
+#ifndef _SHPREAD_H
+#define _SHPREAD_H
+
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+	#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+/*For python modules: needs to come before header files inclusion*/
+#ifdef _HAVE_PYTHON_
+#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
+#endif
+
+#include "../bindings.h"
+#include "../../c/main/globals.h"
+#include "../../c/modules/modules.h"
+#include "../../c/shared/shared.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "ShpRead"
+
+#ifdef _HAVE_MATLAB_MODULES_
+/* serial input macros: */
+#define SHP_IN  prhs[0]
+/* serial output macros: */
+#define SHP_OUT  (mxArray**)&plhs[0]
+#endif
+
+#ifdef _HAVE_PYTHON_MODULES_
+/* serial input macros: */
+#define SHP_IN PyTuple_GetItem(args,0)
+/* serial output macros: */
+#define SHP_OUT output,0
+#endif
+
+/* serial arg counts: */
+#undef NRHS
+#define NRHS  1
+#undef NLHS
+#define NLHS  1
+
+#endif
Index: /issm/trunk-jpl/src/wrappers/matlab/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/wrappers/matlab/Makefile.am	(revision 16412)
+++ /issm/trunk-jpl/src/wrappers/matlab/Makefile.am	(revision 16413)
@@ -88,5 +88,5 @@
 				   Exp2Kml.la\
 				   Kml2Exp.la\
-				   Shp2Exp.la\
+				   ShpRead.la\
 				   Shp2Kml.la
 endif
@@ -269,7 +269,7 @@
 Scotch_la_LIBADD = ${deps} $(SCOTCHLIB) $(MPILIB) $(BLASLAPACKLIB)
 
-Shp2Exp_la_SOURCES = ../Shp2Exp/Shp2Exp.cpp\
-							../Shp2Exp/Shp2Exp.h
-Shp2Exp_la_LIBADD = ${deps} $(SHAPELIBLIB) $(MPILIB) $(PETSCLIB) $(GSLLIB)
+ShpRead_la_SOURCES = ../ShpRead/ShpRead.cpp\
+							../ShpRead/ShpRead.h
+ShpRead_la_LIBADD = ${deps} $(SHAPELIBLIB) $(MPILIB) $(PETSCLIB) $(GSLLIB)
 
 Shp2Kml_la_SOURCES = ../Shp2Kml/Shp2Kml.cpp\
