Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 18844)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 18845)
@@ -856,4 +856,6 @@
 					./classes/kriging/Quadtree.h\
 					./classes/kriging/Quadtree.cpp\
+					./classes/kriging/Covertree.h\
+					./classes/kriging/Covertree.cpp\
 					./classes/kriging/Observation.h\
 					./classes/kriging/Observation.cpp\
Index: /issm/trunk-jpl/src/c/classes/kriging/Covertree.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/kriging/Covertree.cpp	(revision 18845)
+++ /issm/trunk-jpl/src/c/classes/kriging/Covertree.cpp	(revision 18845)
@@ -0,0 +1,12 @@
+#include "../classes.h"
+
+	/*Constructors/Destructors*/
+Covertree::Covertree(){/*{{{*/
+	_error_("Constructor not supported");
+}
+/*}}}*/
+Covertree::~Covertree(){/*{{{*/
+}
+/*}}}*/
+
+	/*Methods*/
Index: /issm/trunk-jpl/src/c/classes/kriging/Covertree.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/kriging/Covertree.h	(revision 18845)
+++ /issm/trunk-jpl/src/c/classes/kriging/Covertree.h	(revision 18845)
@@ -0,0 +1,14 @@
+
+#ifndef _COVERTREE_H
+#define _COVERTREE_H
+
+class Observation;
+
+class Covertree{
+
+	public:
+		Covertree();
+		~Covertree();
+
+};
+#endif //_COVERTREE_H
Index: /issm/trunk-jpl/src/c/classes/kriging/Observations.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/kriging/Observations.cpp	(revision 18844)
+++ /issm/trunk-jpl/src/c/classes/kriging/Observations.cpp	(revision 18845)
@@ -23,4 +23,5 @@
 
 #include "./Quadtree.h"
+#include "./Covertree.h"
 #include "./Variogram.h"
 #include "../../toolkits/toolkits.h"
@@ -31,9 +32,51 @@
 /*Object constructors and destructor*/
 Observations::Observations(){/*{{{*/
-	this->quadtree = NULL;
+	this->treetype  = 0;
+	this->quadtree  = NULL;
+	this->covertree = NULL;
 	return;
 }
 /*}}}*/
 Observations::Observations(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){/*{{{*/
+
+	/*Check that there are observations*/
+	if(n<=0) _error_("No observation found");
+
+	/*Get tree type*/
+	options->Get(&this->treetype,"treetype",1);
+	switch(this->treetype){
+		case 1:
+			this->covertree = NULL;
+			this->InitQuadtree(observations_list,x,y,n,options);
+			break;
+		case 2:
+			this->quadtree = NULL;
+			this->InitCovertree(observations_list,x,y,n,options);
+			break;
+		default:
+			_error_("Tree type "<<this->treetype<<" not supported yet (1: quadtree, 2: covertree)");
+	}
+
+
+
+}
+/*}}}*/
+Observations::~Observations(){/*{{{*/
+	switch(this->treetype){
+		case 1:
+			delete this->quadtree;
+			break;
+		case 2:
+			delete this->covertree;
+			break;
+		default:
+			_error_("Tree type "<<this->treetype<<" not supported yet (1: quadtree, 2: covertree)");
+	}
+	return;
+}
+/*}}}*/
+
+/*Initialize data structures*/
+void Observations::InitQuadtree(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){/*{{{*/
 
 	/*Intermediaries*/
@@ -44,6 +87,6 @@
 	Observation *observation = NULL;
 
-	/*Check that observations is not empty*/
-	if(n==0) _error_("No observation found");
+	/*Checks*/
+	_assert_(n);
 
 	/*Get extrema*/
@@ -110,7 +153,8 @@
 }
 /*}}}*/
-Observations::~Observations(){/*{{{*/
-	delete quadtree;
-	return;
+void Observations::InitCovertree(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){/*{{{*/
+
+	_error_("Not supported yet");
+
 }
 /*}}}*/
@@ -510,4 +554,5 @@
 void Observations::QuadtreeColoring(IssmPDouble* A,IssmPDouble *x,IssmPDouble *y,int n){/*{{{*/
 
+	if(this->treetype!=1) _error_("Tree type is not quadtree");
 	int xi,yi,level;
 
Index: /issm/trunk-jpl/src/c/classes/kriging/Observations.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/kriging/Observations.h	(revision 18844)
+++ /issm/trunk-jpl/src/c/classes/kriging/Observations.h	(revision 18845)
@@ -3,4 +3,5 @@
 
 class Quadtree;
+class Covertree;
 class Variogram;
 class Options;
@@ -16,5 +17,7 @@
 
 	private:
-		Quadtree* quadtree;
+		int        treetype;
+		Quadtree*  quadtree;
+		Covertree* covertree;
 
 	public:
@@ -24,4 +27,8 @@
 		Observations(IssmDouble* observations_list,IssmDouble* x,IssmDouble* y,int n,Options* options);
 		~Observations();
+
+		/*Initialize data structures*/
+		void InitQuadtree(IssmDouble* observations_list,IssmDouble* x,IssmDouble* y,int n,Options* options);
+		void InitCovertree(IssmDouble* observations_list,IssmDouble* x,IssmDouble* y,int n,Options* options);
 
 		/*Methods*/
Index: /issm/trunk-jpl/src/c/classes/kriging/krigingobjects.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/kriging/krigingobjects.h	(revision 18844)
+++ /issm/trunk-jpl/src/c/classes/kriging/krigingobjects.h	(revision 18845)
@@ -13,4 +13,5 @@
 #include "./PowerVariogram.h"
 #include "./Quadtree.h"
+#include "./Covertree.h"
 #include "./Observation.h"
 #include "./Observations.h"
