From 821248b8c7494ccecd3c9a7ec9e2f18a570914e0 Mon Sep 17 00:00:00 2001
From: Romain Garrigues <romain.garrigues@c-s.fr>
Date: Mon, 26 Nov 2007 09:32:35 +0000
Subject: [PATCH] nomsg

---
 Code/Projections/otbForwardSensorModel.h   |  6 +++++-
 Code/Projections/otbForwardSensorModel.txx |  5 +++--
 Code/Projections/otbMapProjection.h        | 10 +---------
 Code/Projections/otbMapProjection.txx      |  9 ---------
 4 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/Code/Projections/otbForwardSensorModel.h b/Code/Projections/otbForwardSensorModel.h
index 6ba634bbfb..32d25bc975 100644
--- a/Code/Projections/otbForwardSensorModel.h
+++ b/Code/Projections/otbForwardSensorModel.h
@@ -74,7 +74,7 @@ namespace otb
       
       /** Compute the world coordinates. */ 
       OutputPointType TransformPoint(const InputPointType &point) const;
-      
+ 			
       protected:
       ForwardSensorModel(); 
       virtual ~ForwardSensorModel();
@@ -87,7 +87,11 @@ namespace otb
       ForwardSensorModel(const Self&); //purposely not implemented
       void operator=(const Self&);     //purposely not implemented
 			
+			/** Difference between consecutives heights in iterative transform point with DEM */
 			double m_Epsilon;
+			
+			/** Number of iterations in iterative transform point with DEM */
+			double m_NbIter;
     };
   
   
diff --git a/Code/Projections/otbForwardSensorModel.txx b/Code/Projections/otbForwardSensorModel.txx
index e7cfd15e60..973fb9fcba 100644
--- a/Code/Projections/otbForwardSensorModel.txx
+++ b/Code/Projections/otbForwardSensorModel.txx
@@ -37,6 +37,7 @@ ForwardSensorModel< TScalarType,
 ::ForwardSensorModel()
 {
 	m_Epsilon = 0.0001;
+	m_NbIter = 1;
 }
 
 template < class TScalarType,
@@ -85,13 +86,13 @@ ForwardSensorModel< TScalarType,
 	{
 		ossimGpt ossimGPointRef = ossimGPoint;
 		double height, heightTmp ;
-		double diffHeight = 100;
+		double diffHeight = 100; // arbitrary value
 		itk::Point<double, 2> point;
 		int nbIter = 0;
 	
 		otbMsgDevMacro(<< "USING DEM ! ") ;
 
-		while ((diffHeight > m_Epsilon)	&& (nbIter < 2))
+		while ((diffHeight > m_Epsilon)	&& (nbIter < m_NbIter))
 		{
 			otbMsgDevMacro(<< "Iter " << nbIter);
 			
diff --git a/Code/Projections/otbMapProjection.h b/Code/Projections/otbMapProjection.h
index 7ba5ecdc0a..8984271b01 100644
--- a/Code/Projections/otbMapProjection.h
+++ b/Code/Projections/otbMapProjection.h
@@ -84,12 +84,9 @@ namespace otb
       void SetEllipsoid (const ossimEllipsoid &ellipsoid);
       void SetEllipsoid(std::string code);
       void SetEllipsoid(const double &major_axis, const double &minor_axis);
-      //OutputPointType Forward(const InputPointType &point) const;
-      //InputPointType Inverse(const OutputPointType &point) const;
-	
+ 
       OutputPointType TransformPoint(const InputPointType &point) const;
       virtual InputPointType Origin();
-      //virtual void LineSampleToEastingNorthing(const InputPointType &linesample, InputPointType &eastingNorthing) const; 
       virtual double GetFalseNorthing() const;
       virtual double GetFalseEasting() const;
       virtual double GetStandardParallel1() const;
@@ -112,11 +109,6 @@ namespace otb
       void SetFalseEasting(double falseEasting);
 			
 			virtual void PrintMap() const ;
-			/** Return the inverse of the transform.
-   		 *  The inverse is recomputed if it has been modified */
-		  //bool GetInverse(Self*) const ;
-			
-//			virtual void Initialize(const InputPointType& middlePoint) {};
 
       protected:
       MapProjection();
diff --git a/Code/Projections/otbMapProjection.txx b/Code/Projections/otbMapProjection.txx
index 1326157ee3..243fb051c2 100644
--- a/Code/Projections/otbMapProjection.txx
+++ b/Code/Projections/otbMapProjection.txx
@@ -63,11 +63,8 @@ namespace otb
   {
     const ossimEllipsoid *ellipsoid = ossimEllipsoidFactory::instance()->create(ossimString(code));
     double a=ellipsoid->getA();
-    //std::cout <<a<< std::endl;
     double b=ellipsoid->getB();
-    //std::cout <<b<< std::endl;
     //ossimString codes=ellipsoid->name();
-    //std::cout <<codes<< std::endl;
     ossimEllipsoid ellipse(a,b);
     delete m_MapProjection;
     m_MapProjection= new OssimMapProjectionType(ellipse);
@@ -359,12 +356,6 @@ namespace otb
 		std::cout << m_MapProjection->print(std::cout);
 	}
 
-	/*bool GetInverse(Self*) const 
-	{
-		
-	
-	}*/
-	
 	
 	
 } // namespace otb
-- 
GitLab