Index: ../trunk-jpl/src/c/classes/kriging/Observations.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/kriging/Observations.cpp	(revision 18914)
+++ ../trunk-jpl/src/c/classes/kriging/Observations.cpp	(revision 18915)
@@ -627,31 +627,24 @@
     double *obs          = NULL;
     Observation observation=Observation(x_interp,y_interp,0.);
     std::vector<Observation> kNN;
-    
-    /*If radius is not provided or is 0, return all observations*/
-    if(radius==0.)
-    {
-        kNN=(this->covertree->getRoot())->getObservations();
-    }
-    else
-    {
-        kNN=(this->covertree->kNearestNeighbors(observation, maxdata));
-		//cout << "kNN's size: " << kNN.size() << endl;
-		
-    }
+
+	 kNN=(this->covertree->kNearestNeighbors(observation, maxdata));
+	 //cout << "kNN's size: " << kNN.size() << endl;
 	
 	//kNN is sort from closest to farthest neighbor
 	//searches for the first neighbor that is out of radius
 	//deletes and resizes the kNN vector
 	vector<Observation>::iterator it;
-	for (it = kNN.begin(); it != kNN.end(); ++it) {
-		//(*it).print();
-		//cout << "\n" << (*it).distance(observation) << endl;
-		if ((*it).distance(observation) > radius) {
-			break;
+	if(radius>0.){
+		for (it = kNN.begin(); it != kNN.end(); ++it) {
+			//(*it).print();
+			//cout << "\n" << (*it).distance(observation) << endl;
+			if ((*it).distance(observation) > radius) {
+				break;
+			}
 		}
+		kNN.erase(it, kNN.end());
 	}
-	kNN.erase(it, kNN.end());
     
 	/*Allocate vectors*/
 	x   = new double[kNN.size()];
@@ -660,7 +653,7 @@
 
 	/*Loop over all observations and fill in x, y and obs*/
 	int i = 0;
-	for (it = kNN.begin(); it != kNN.end(); ++it) {
+	for(it = kNN.begin(); it != kNN.end(); ++it) {
 		(*it).WriteXYObs((*it), &x[i], &y[i], &obs[i]);
 		i++;
 	}
@@ -668,5 +661,5 @@
     *px=x;
     *py=y;
     *pobs=obs;
-	*pnobs = kNN.size();
+	 *pnobs = kNN.size();
 }/*}}}*/
