[QGIS Commit] r11991 - in trunk/qgis/src: analysis/interpolation plugins/gps_importer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Nov 7 18:32:12 EST 2009


Author: jef
Date: 2009-11-07 18:32:12 -0500 (Sat, 07 Nov 2009)
New Revision: 11991

Modified:
   trunk/qgis/src/analysis/interpolation/Bezier3D.cc
   trunk/qgis/src/analysis/interpolation/Bezier3D.h
   trunk/qgis/src/analysis/interpolation/CloughTocherInterpolator.cc
   trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc
   trunk/qgis/src/analysis/interpolation/NormVecDecorator.h
   trunk/qgis/src/analysis/interpolation/TriDecorator.cc
   trunk/qgis/src/analysis/interpolation/TriDecorator.h
   trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.h
Log:
fix windows build

Modified: trunk/qgis/src/analysis/interpolation/Bezier3D.cc
===================================================================
--- trunk/qgis/src/analysis/interpolation/Bezier3D.cc	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/analysis/interpolation/Bezier3D.cc	2009-11-07 23:32:12 UTC (rev 11991)
@@ -15,7 +15,7 @@
  ***************************************************************************/
 
 #include "Bezier3D.h"
-#include <iostream>
+#include "qgslogger.h"
 
 
 void Bezier3D::calcFirstDer( float t, Vector3D* v )
@@ -31,7 +31,7 @@
       return;
     }
 
-    for ( int n = 1;n <= int( mControlPoly->count() - 1 );n++ )
+    for ( int n = 1; n <= int( mControlPoly->count() - 1 ); n++ )
     {
       double bernst = MathUtils::calcBernsteinPoly( mControlPoly->count() - 2, n - 1, t );
       v->setX( v->getX() + (( *mControlPoly )[n]->getX() - ( *mControlPoly )[n-1]->getX() )*bernst );
@@ -45,7 +45,7 @@
 
   else
   {
-    std::cout << "warning: null pointer in Bezier3D::calcFirstDer" << std::endl << std::flush;
+    QgsDebugMsg( "warning: null pointer" );
   }
 }
 
@@ -58,7 +58,7 @@
     p->setY( 0 );
     p->setZ( 0 );
 
-    for ( int n = 1;n <= int( mControlPoly->count() );n++ )
+    for ( int n = 1; n <= int( mControlPoly->count() ); n++ )
     {
       double bernst = MathUtils::calcBernsteinPoly( mControlPoly->count() - 1, n - 1, t );
       p->setX( p->getX() + ( *mControlPoly )[n-1]->getX()*bernst );
@@ -69,7 +69,7 @@
 
   else
   {
-    std::cout << "warning: null pointer in Bezier3D::calcPoint" << std::endl << std::flush;
+    QgsDebugMsg( "warning: null pointer" );
   }
 }
 
@@ -86,7 +86,7 @@
       return;
     }
 
-    for ( int n = 1;n <= int( mControlPoly->count() - 2 );n++ )
+    for ( int n = 1; n <= int( mControlPoly->count() - 2 ); n++ )
     {
       double bernst = MathUtils::calcBernsteinPoly( mControlPoly->count() - 3, n - 1, t );
       v->setX( v->getX() + (( *mControlPoly )[n+1]->getX() - 2*( *mControlPoly )[n]->getX() + ( *mControlPoly )[n-1]->getX() )*bernst );
@@ -100,7 +100,7 @@
 
   else
   {
-    std::cout << "warning: null pointer in Bezier3D::calcSecDer" << std::endl << std::flush;
+    QgsDebugMsg( "warning: null pointer" );
   }
 }
 
@@ -110,12 +110,12 @@
   if ( mControlPoly )
   {
     Point3D** pointer = new Point3D*[mControlPoly->count()];//create an array to temporarily store pointer to the control points
-    for ( uint i = 0;i < mControlPoly->count();i++ )//store the points
+    for ( int i = 0; i < mControlPoly->count(); i++ )//store the points
     {
       pointer[i] = ( *mControlPoly )[i];
     }
 
-    for ( uint i = 0;i < mControlPoly->count();i++ )
+    for ( int i = 0; i < mControlPoly->count(); i++ )
     {
       mControlPoly->insert( i, pointer[( mControlPoly->count()-1 )-i] );
     }
@@ -123,7 +123,7 @@
 
   else
   {
-    std::cout << "warning: null pointer in Bezier3D::changeDirection" << std::endl << std::flush;
+    QgsDebugMsg( "warning: null pointer" );
   }
 }
 

Modified: trunk/qgis/src/analysis/interpolation/Bezier3D.h
===================================================================
--- trunk/qgis/src/analysis/interpolation/Bezier3D.h	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/analysis/interpolation/Bezier3D.h	2009-11-07 23:32:12 UTC (rev 11991)
@@ -17,11 +17,10 @@
 #ifndef BEZIER3D_H
 #define BEZIER3D_H
 
-using namespace std;
-
 #include "ParametricLine.h"
 #include "Vector3D.h"
 #include "MathUtils.h"
+#include "qgslogger.h"
 
 /**Class Bezier3D represents a bezier curve, represented by control points. Parameter t is running from 0 to 1. The class is capable to calculate the curve point and the first two derivatives belonging to t.*/
 class ANALYSIS_EXPORT Bezier3D: public ParametricLine
@@ -86,12 +85,12 @@
 
 inline void Bezier3D::add( ParametricLine* pl )
 {
-  cout << "Error!!!!! A Bezier-curve can not be parent of a ParametricLine." << endl;
+  QgsDebugMsg( "Error!!!!! A Bezier-curve can not be parent of a ParametricLine." );
 }
 
 inline void Bezier3D::remove( int i )
 {
-  cout << "Error!!!!! A Bezier-curve has no Childs to remove." << endl;
+  QgsDebugMsg( "Error!!!!! A Bezier-curve has no Childs to remove." );
 }
 
 //-----------------------------------------------setters and getters---------------------------------------------------------------
@@ -127,10 +126,4 @@
   mDegree = mControlPoly->count() - 1;
 }
 
-#endif
-
-
-
-
-
-
+#endif
\ No newline at end of file

Modified: trunk/qgis/src/analysis/interpolation/CloughTocherInterpolator.cc
===================================================================
--- trunk/qgis/src/analysis/interpolation/CloughTocherInterpolator.cc	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/analysis/interpolation/CloughTocherInterpolator.cc	2009-11-07 23:32:12 UTC (rev 11991)
@@ -15,6 +15,7 @@
  ***************************************************************************/
 
 #include "CloughTocherInterpolator.h"
+#include "qgslogger.h"
 #ifndef Q_OS_MACX
 #include <cmath>
 #else
@@ -123,7 +124,7 @@
       return true;
     }
 
-    cout << "warning, point outside the triangle in CloughTocherInterpolator::calcNormVec" << endl << flush;
+    QgsDebugMsg( "warning, point outside the triangle" );
     result->setX( 0 );//return a vertical normal if failed
     result->setY( 0 );
     result->setZ( 1 );
@@ -132,7 +133,7 @@
   }
   else
   {
-    cout << "warning, null pointer in CloughTocherInterpolator::calcPoint" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -199,7 +200,7 @@
     }
     else
     {
-      cout << "warning, point outside the triangle in CloughTocherInterpolator::calcPoint" << endl << flush;
+      QgsDebugMsg( "warning, point outside the triangle" );
       result->setX( x );
       result->setY( y );
       result->setZ( 0 );
@@ -210,7 +211,7 @@
   }
   else
   {
-    cout << "warning, null pointer in CloughTocherInterpolator::calcPoint" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -455,277 +456,279 @@
   }
   else
   {
-    cout << "warning, null pointer in CloughTocherInterpolator::init" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
 
-/*void CloughTocherInterpolator::init(double x,double y)//version which has unintended breaklines similar to the Coons interpolator
+#if 0
+void CloughTocherInterpolator::init( double x, double y )//version which has unintended breaklines similar to the Coons interpolator
 {
-  Vector3D v1,v2,v3;//normals at the three data points
+  Vector3D v1, v2, v3;//normals at the three data points
   int ptn1, ptn2, ptn3;//numbers of the vertex points
   NormVecDecorator::pointState state1, state2, state3;//states of the vertex points (NORMAL, BREAKLINE, ENDPOINT possible)
 
-  if(mTIN)
+  if ( mTIN )
+  {
+    mTIN->getTriangle( x, y, &point1, &ptn1, &v1, &state1, &point2, &ptn2, &v2, &state2, &point3, &ptn3, &v3, &state3 );
+
+    if ( point1 == lpoint1 && point2 == lpoint2 && point3 == lpoint3 )//if we are in the same triangle as at the last run, we can leave 'init'
     {
-      mTIN->getTriangle(x,y,&point1,&ptn1,&v1,&state1,&point2,&ptn2,&v2,&state2,&point3,&ptn3,&v3,&state3);
+      return;
+    }
 
-      if(point1==lpoint1&&point2==lpoint2&&point3==lpoint3)//if we are in the same triangle as at the last run, we can leave 'init'
- {
-   return;
- }
+    //calculate the partial derivatives at the data points
+    der1X = -v1.getX() / v1.getZ();
+    der1Y = -v1.getY() / v1.getZ();
+    der2X = -v2.getX() / v2.getZ();
+    der2Y = -v2.getY() / v2.getZ();
+    der3X = -v3.getX() / v3.getZ();
+    der3Y = -v3.getY() / v3.getZ();
 
-      //calculate the partial derivatives at the data points
-      der1X=-v1.getX()/v1.getZ();
-      der1Y=-v1.getY()/v1.getZ();
-      der2X=-v2.getX()/v2.getZ();
-      der2Y=-v2.getY()/v2.getZ();
-      der3X=-v3.getX()/v3.getZ();
-      der3Y=-v3.getY()/v3.getZ();
+    //calculate the control points
+    cp1.setX( point1.getX() + ( point2.getX() - point1.getX() ) / 3 );
+    cp1.setY( point1.getY() + ( point2.getY() - point1.getY() ) / 3 );
+    cp1.setZ( point1.getZ() + ( cp1.getX() - point1.getX() )*der1X + ( cp1.getY() - point1.getY() )*der1Y );
 
-      //calculate the control points
-      cp1.setX(point1.getX()+(point2.getX()-point1.getX())/3);
-      cp1.setY(point1.getY()+(point2.getY()-point1.getY())/3);
-      cp1.setZ(point1.getZ()+(cp1.getX()-point1.getX())*der1X+(cp1.getY()-point1.getY())*der1Y);
+    cp2.setX( point2.getX() + ( point1.getX() - point2.getX() ) / 3 );
+    cp2.setY( point2.getY() + ( point1.getY() - point2.getY() ) / 3 );
+    cp2.setZ( point2.getZ() + ( cp2.getX() - point2.getX() )*der2X + ( cp2.getY() - point2.getY() )*der2Y );
 
-      cp2.setX(point2.getX()+(point1.getX()-point2.getX())/3);
-      cp2.setY(point2.getY()+(point1.getY()-point2.getY())/3);
-      cp2.setZ(point2.getZ()+(cp2.getX()-point2.getX())*der2X+(cp2.getY()-point2.getY())*der2Y);
+    cp9.setX( point2.getX() + ( point3.getX() - point2.getX() ) / 3 );
+    cp9.setY( point2.getY() + ( point3.getY() - point2.getY() ) / 3 );
+    cp9.setZ( point2.getZ() + ( cp9.getX() - point2.getX() )*der2X + ( cp9.getY() - point2.getY() )*der2Y );
 
-      cp9.setX(point2.getX()+(point3.getX()-point2.getX())/3);
-      cp9.setY(point2.getY()+(point3.getY()-point2.getY())/3);
-      cp9.setZ(point2.getZ()+(cp9.getX()-point2.getX())*der2X+(cp9.getY()-point2.getY())*der2Y);
+    cp16.setX( point3.getX() + ( point2.getX() - point3.getX() ) / 3 );
+    cp16.setY( point3.getY() + ( point2.getY() - point3.getY() ) / 3 );
+    cp16.setZ( point3.getZ() + ( cp16.getX() - point3.getX() )*der3X + ( cp16.getY() - point3.getY() )*der3Y );
 
-      cp16.setX(point3.getX()+(point2.getX()-point3.getX())/3);
-      cp16.setY(point3.getY()+(point2.getY()-point3.getY())/3);
-      cp16.setZ(point3.getZ()+(cp16.getX()-point3.getX())*der3X+(cp16.getY()-point3.getY())*der3Y);
+    cp14.setX( point3.getX() + ( point1.getX() - point3.getX() ) / 3 );
+    cp14.setY( point3.getY() + ( point1.getY() - point3.getY() ) / 3 );
+    cp14.setZ( point3.getZ() + ( cp14.getX() - point3.getX() )*der3X + ( cp14.getY() - point3.getY() )*der3Y );
 
-      cp14.setX(point3.getX()+(point1.getX()-point3.getX())/3);
-      cp14.setY(point3.getY()+(point1.getY()-point3.getY())/3);
-      cp14.setZ(point3.getZ()+(cp14.getX()-point3.getX())*der3X+(cp14.getY()-point3.getY())*der3Y);
+    cp6.setX( point1.getX() + ( point3.getX() - point1.getX() ) / 3 );
+    cp6.setY( point1.getY() + ( point3.getY() - point1.getY() ) / 3 );
+    cp6.setZ( point1.getZ() + ( cp6.getX() - point1.getX() )*der1X + ( cp6.getY() - point1.getY() )*der1Y );
 
-      cp6.setX(point1.getX()+(point3.getX()-point1.getX())/3);
-      cp6.setY(point1.getY()+(point3.getY()-point1.getY())/3);
-      cp6.setZ(point1.getZ()+(cp6.getX()-point1.getX())*der1X+(cp6.getY()-point1.getY())*der1Y);
+    //set x- and y-coordinates of the central point
+    cp10.setX(( point1.getX() + point2.getX() + point3.getX() ) / 3 );
+    cp10.setY(( point1.getY() + point2.getY() + point3.getY() ) / 3 );
 
-      //set x- and y-coordinates of the central point
-      cp10.setX((point1.getX()+point2.getX()+point3.getX())/3);
-      cp10.setY((point1.getY()+point2.getY()+point3.getY())/3);
+    //do the necessary adjustments in case of breaklines--------------------------------------------------------------------
 
-      //do the necessary adjustments in case of breaklines--------------------------------------------------------------------
+    //temporary normals and derivatives
+    double tmpx = 0;
+    double tmpy = 0;
+    Vector3D tmp( 0, 0, 0 );
 
-      //temporary normals and derivatives
-      double tmpx=0;
-      double tmpy=0;
-      Vector3D tmp(0,0,0);
+    //point1
+    if ( state1 == NormVecDecorator::BREAKLINE )
+    {
+      if ( mTIN->calcNormalForPoint( x, y, ptn1, &tmp ) )
+      {
+        tmpx = -tmp.getX() / tmp.getZ();
+        tmpy = -tmp.getY() / tmp.getZ();
+        if ( state3 == NormVecDecorator::NORMAL )
+        {
+          cp6.setZ( point1.getZ() + (( point3.getX() - point1.getX() ) / 3 )*tmpx + (( point3.getY() - point1.getY() ) / 3 )*tmpy );
+        }
+        if ( state2 == NormVecDecorator::NORMAL )
+        {
+          cp1.setZ( point1.getZ() + (( point2.getX() - point1.getX() ) / 3 )*tmpx + (( point2.getY() - point1.getY() ) / 3 )*tmpy );
+        }
+      }
+    }
 
-      //point1
-      if(state1==NormVecDecorator::BREAKLINE)
- {
-   if(mTIN->calcNormalForPoint(x,y,ptn1,&tmp))
-     {
-       tmpx=-tmp.getX()/tmp.getZ();
-       tmpy=-tmp.getY()/tmp.getZ();
-       if(state3==NormVecDecorator::NORMAL)
-  {
-    cp6.setZ(point1.getZ()+((point3.getX()-point1.getX())/3)*tmpx+((point3.getY()-point1.getY())/3)*tmpy);
-  }
-       if(state2==NormVecDecorator::NORMAL)
-  {
-    cp1.setZ(point1.getZ()+((point2.getX()-point1.getX())/3)*tmpx+((point2.getY()-point1.getY())/3)*tmpy);
-  }
-     }
- }
+    if ( state2 == NormVecDecorator::BREAKLINE )
+    {
+      if ( mTIN->calcNormalForPoint( x, y, ptn2, &tmp ) )
+      {
+        tmpx = -tmp.getX() / tmp.getZ();
+        tmpy = -tmp.getY() / tmp.getZ();
+        if ( state1 == NormVecDecorator::NORMAL )
+        {
+          cp2.setZ( point2.getZ() + (( point1.getX() - point2.getX() ) / 3 )*tmpx + (( point1.getY() - point2.getY() ) / 3 )*tmpy );
+        }
+        if ( state3 == NormVecDecorator::NORMAL )
+        {
+          cp9.setZ( point2.getZ() + (( point3.getX() - point2.getX() ) / 3 )*tmpx + (( point3.getY() - point2.getY() ) / 3 )*tmpy );
+        }
+      }
+    }
 
-      if(state2==NormVecDecorator::BREAKLINE)
- {
-   if(mTIN->calcNormalForPoint(x,y,ptn2,&tmp))
-     {
-       tmpx=-tmp.getX()/tmp.getZ();
-       tmpy=-tmp.getY()/tmp.getZ();
-       if(state1==NormVecDecorator::NORMAL)
-  {
-    cp2.setZ(point2.getZ()+((point1.getX()-point2.getX())/3)*tmpx+((point1.getY()-point2.getY())/3)*tmpy);
-  }
-       if(state3==NormVecDecorator::NORMAL)
-  {
-    cp9.setZ(point2.getZ()+((point3.getX()-point2.getX())/3)*tmpx+((point3.getY()-point2.getY())/3)*tmpy);
-  }
-     }
- }
+    if ( state3 == NormVecDecorator::BREAKLINE )
+    {
+      if ( mTIN->calcNormalForPoint( x, y, ptn3, &tmp ) )
+      {
+        tmpx = -tmp.getX() / tmp.getZ();
+        tmpy = -tmp.getY() / tmp.getZ();
+        if ( state1 == NormVecDecorator::NORMAL )
+        {
+          cp14.setZ( point3.getZ() + (( point1.getX() - point3.getX() ) / 3 )*tmpx + (( point1.getY() - point3.getY() ) / 3 )*tmpy );
+        }
+        if ( state2 == NormVecDecorator::NORMAL )
+        {
+          cp16.setZ( point3.getZ() + (( point2.getX() - point3.getX() ) / 3 )*tmpx + (( point2.getY() - point3.getY() ) / 3 )*tmpy );
+        }
+      }
+    }
 
-      if(state3==NormVecDecorator::BREAKLINE)
- {
-   if(mTIN->calcNormalForPoint(x,y,ptn3,&tmp))
-     {
-       tmpx=-tmp.getX()/tmp.getZ();
-       tmpy=-tmp.getY()/tmp.getZ();
-       if(state1==NormVecDecorator::NORMAL)
-  {
-    cp14.setZ(point3.getZ()+((point1.getX()-point3.getX())/3)*tmpx+((point1.getY()-point3.getY())/3)*tmpy);
-  }
-       if(state2==NormVecDecorator::NORMAL)
-  {
-    cp16.setZ(point3.getZ()+((point2.getX()-point3.getX())/3)*tmpx+((point2.getY()-point3.getY())/3)*tmpy);
-  }
-     }
- }
+    //calculate cp3, cp 5 and cp15
+    Vector3D normal;//temporary normal for the vertices on breaklines
 
-      //calculate cp3, cp 5 and cp15
-      Vector3D normal;//temporary normal for the vertices on breaklines
+    cp3.setX( point1.getX() + ( cp10.getX() - point1.getX() ) / 3 );
+    cp3.setY( point1.getY() + ( cp10.getY() - point1.getY() ) / 3 );
+    if ( state1 == NormVecDecorator::BREAKLINE )
+    {
+      MathUtils::normalFromPoints( &point1, &cp1, &cp6, &normal );
+      //recalculate der1X and der1Y
+      der1X = -normal.getX() / normal.getZ();
+      der1Y = -normal.getY() / normal.getZ();
+    }
 
-      cp3.setX(point1.getX()+(cp10.getX()-point1.getX())/3);
-      cp3.setY(point1.getY()+(cp10.getY()-point1.getY())/3);
-      if(state1==NormVecDecorator::BREAKLINE)
- {
-   MathUtils::normalFromPoints(&point1,&cp1,&cp6,&normal);
-   //recalculate der1X and der1Y
-   der1X=-normal.getX()/normal.getZ();
-   der1Y=-normal.getY()/normal.getZ();
- }
+    cp3.setZ( point1.getZ() + ( cp3.getX() - point1.getX() )*der1X + ( cp3.getY() - point1.getY() )*der1Y );
 
-      cp3.setZ(point1.getZ()+(cp3.getX()-point1.getX())*der1X+(cp3.getY()-point1.getY())*der1Y);
 
 
+    cp5.setX( point2.getX() + ( cp10.getX() - point2.getX() ) / 3 );
+    cp5.setY( point2.getY() + ( cp10.getY() - point2.getY() ) / 3 );
+    if ( state2 == NormVecDecorator::BREAKLINE )
+    {
+      MathUtils::normalFromPoints( &point2, &cp9, &cp2, &normal );
+      //recalculate der2X and der2Y
+      der2X = -normal.getX() / normal.getZ();
+      der2Y = -normal.getY() / normal.getZ();
+    }
 
-      cp5.setX(point2.getX()+(cp10.getX()-point2.getX())/3);
-      cp5.setY(point2.getY()+(cp10.getY()-point2.getY())/3);
-      if(state2==NormVecDecorator::BREAKLINE)
- {
-   MathUtils::normalFromPoints(&point2,&cp9,&cp2,&normal);
-   //recalculate der2X and der2Y
-   der2X=-normal.getX()/normal.getZ();
-   der2Y=-normal.getY()/normal.getZ();
- }
+    cp5.setZ( point2.getZ() + ( cp5.getX() - point2.getX() )*der2X + ( cp5.getY() - point2.getY() )*der2Y );
 
-      cp5.setZ(point2.getZ()+(cp5.getX()-point2.getX())*der2X+(cp5.getY()-point2.getY())*der2Y);
 
+    cp15.setX( point3.getX() + ( cp10.getX() - point3.getX() ) / 3 );
+    cp15.setY( point3.getY() + ( cp10.getY() - point3.getY() ) / 3 );
+    if ( state3 == NormVecDecorator::BREAKLINE )
+    {
+      MathUtils::normalFromPoints( &point3, &cp14, &cp16, &normal );
+      //recalculate der3X and der3Y
+      der3X = -normal.getX() / normal.getZ();
+      der3Y = -normal.getY() / normal.getZ();
+    }
 
-      cp15.setX(point3.getX()+(cp10.getX()-point3.getX())/3);
-      cp15.setY(point3.getY()+(cp10.getY()-point3.getY())/3);
-      if(state3==NormVecDecorator::BREAKLINE)
- {
-   MathUtils::normalFromPoints(&point3,&cp14,&cp16,&normal);
-   //recalculate der3X and der3Y
-   der3X=-normal.getX()/normal.getZ();
-   der3Y=-normal.getY()/normal.getZ();
- }
+    cp15.setZ( point3.getZ() + ( cp15.getX() - point3.getX() )*der3X + ( cp15.getY() - point3.getY() )*der3Y );
 
-      cp15.setZ(point3.getZ()+(cp15.getX()-point3.getX())*der3X+(cp15.getY()-point3.getY())*der3Y);
 
+    cp4.setX(( point1.getX() + cp10.getX() + point2.getX() ) / 3 );
+    cp4.setY(( point1.getY() + cp10.getY() + point2.getY() ) / 3 );
 
-      cp4.setX((point1.getX()+cp10.getX()+point2.getX())/3);
-      cp4.setY((point1.getY()+cp10.getY()+point2.getY())/3);
+    Point3D midpoint3(( cp1.getX() + cp2.getX() ) / 2, ( cp1.getY() + cp2.getY() ) / 2, ( cp1.getZ() + cp2.getZ() ) / 2 );
+    Vector3D cp1cp2( cp2.getX() - cp1.getX(), cp2.getY() - cp1.getY(), cp2.getZ() - cp1.getZ() );
+    Vector3D odir3( 0, 0, 0 );//direction orthogonal to the line from point1 to point2
+    if (( point2.getY() - point1.getY() ) != 0 )//avoid division through zero
+    {
+      odir3.setX( 1 );
+      odir3.setY( -( point2.getX() - point1.getX() ) / ( point2.getY() - point1.getY() ) );
+      odir3.setZ(( der1X + der2X ) / 2 + ( der1Y + der2Y ) / 2*odir3.getY() );//take the linear interpolated cross-derivative
+    }
+    else
+    {
+      odir3.setY( 1 );
+      odir3.setX( -( point2.getY() - point1.getY() ) / ( point2.getX() - point1.getX() ) );
+      odir3.setZ(( der1X + der2X ) / 2*odir3.getX() + ( der1Y + der2Y ) / 2 );
+    }
+    Vector3D midpoint3cp4( 0, 0, 0 );
+    MathUtils::derVec( &cp1cp2, &odir3, &midpoint3cp4, cp4.getX() - midpoint3.getX(), cp4.getY() - midpoint3.getY() );
+    cp4.setZ( midpoint3.getZ() + midpoint3cp4.getZ() );
 
-      Point3D midpoint3((cp1.getX()+cp2.getX())/2,(cp1.getY()+cp2.getY())/2,(cp1.getZ()+cp2.getZ())/2);
-      Vector3D cp1cp2(cp2.getX()-cp1.getX(),cp2.getY()-cp1.getY(),cp2.getZ()-cp1.getZ());
-      Vector3D odir3(0,0,0);//direction orthogonal to the line from point1 to point2
-      if((point2.getY()-point1.getY())!=0)//avoid division through zero
- {
-   odir3.setX(1);
-   odir3.setY(-(point2.getX()-point1.getX())/(point2.getY()-point1.getY()));
-   odir3.setZ((der1X+der2X)/2+(der1Y+der2Y)/2*odir3.getY());//take the linear interpolated cross-derivative
- }
-      else
- {
-   odir3.setY(1);
-   odir3.setX(-(point2.getY()-point1.getY())/(point2.getX()-point1.getX()));
-   odir3.setZ((der1X+der2X)/2*odir3.getX()+(der1Y+der2Y)/2);
- }
-      Vector3D midpoint3cp4(0,0,0);
-      MathUtils::derVec(&cp1cp2,&odir3,&midpoint3cp4,cp4.getX()-midpoint3.getX(),cp4.getY()-midpoint3.getY());
-      cp4.setZ(midpoint3.getZ()+midpoint3cp4.getZ());
+    cp13.setX(( point2.getX() + cp10.getX() + point3.getX() ) / 3 );
+    cp13.setY(( point2.getY() + cp10.getY() + point3.getY() ) / 3 );
+    //find the point in the middle of the bezier curve between point2 and point3
+    Point3D midpoint1(( cp9.getX() + cp16.getX() ) / 2, ( cp9.getY() + cp16.getY() ) / 2, ( cp9.getZ() + cp16.getZ() ) / 2 );
+    Vector3D cp9cp16( cp16.getX() - cp9.getX(), cp16.getY() - cp9.getY(), cp16.getZ() - cp9.getZ() );
+    Vector3D odir1( 0, 0, 0 );//direction orthogonal to the line from point2 to point3
+    if (( point3.getY() - point2.getY() ) != 0 )//avoid division through zero
+    {
+      odir1.setX( 1 );
+      odir1.setY( -( point3.getX() - point2.getX() ) / ( point3.getY() - point2.getY() ) );
+      odir1.setZ(( der2X + der3X ) / 2 + ( der2Y + der3Y ) / 2*odir1.getY() );//take the linear interpolated cross-derivative
+    }
+    else
+    {
+      odir1.setY( 1 );
+      odir1.setX( -( point3.getY() - point2.getY() ) / ( point3.getX() - point2.getX() ) );
+      odir1.setZ(( der2X + der3X ) / 2*odir1.getX() + ( der2Y + der3Y ) / 2 );
+    }
+    Vector3D midpoint1cp13( 0, 0, 0 );
+    MathUtils::derVec( &cp9cp16, &odir1, &midpoint1cp13, cp13.getX() - midpoint1.getX(), cp13.getY() - midpoint1.getY() );
+    cp13.setZ( midpoint1.getZ() + midpoint1cp13.getZ() );
 
-      cp13.setX((point2.getX()+cp10.getX()+point3.getX())/3);
-      cp13.setY((point2.getY()+cp10.getY()+point3.getY())/3);
-      //find the point in the middle of the bezier curve between point2 and point3
-      Point3D midpoint1((cp9.getX()+cp16.getX())/2,(cp9.getY()+cp16.getY())/2,(cp9.getZ()+cp16.getZ())/2);
-      Vector3D cp9cp16(cp16.getX()-cp9.getX(),cp16.getY()-cp9.getY(),cp16.getZ()-cp9.getZ());
-      Vector3D odir1(0,0,0);//direction orthogonal to the line from point2 to point3
-      if((point3.getY()-point2.getY())!=0)//avoid division through zero
- {
-   odir1.setX(1);
-   odir1.setY(-(point3.getX()-point2.getX())/(point3.getY()-point2.getY()));
-   odir1.setZ((der2X+der3X)/2+(der2Y+der3Y)/2*odir1.getY());//take the linear interpolated cross-derivative
- }
-      else
- {
-   odir1.setY(1);
-   odir1.setX(-(point3.getY()-point2.getY())/(point3.getX()-point2.getX()));
-   odir1.setZ((der2X+der3X)/2*odir1.getX()+(der2Y+der3Y)/2);
- }
-      Vector3D midpoint1cp13(0,0,0);
-      MathUtils::derVec(&cp9cp16,&odir1,&midpoint1cp13,cp13.getX()-midpoint1.getX(),cp13.getY()-midpoint1.getY());
-      cp13.setZ(midpoint1.getZ()+midpoint1cp13.getZ());
 
+    cp11.setX(( point3.getX() + cp10.getX() + point1.getX() ) / 3 );
+    cp11.setY(( point3.getY() + cp10.getY() + point1.getY() ) / 3 );
+    //find the point in the middle of the bezier curve between point3 and point2
+    Point3D midpoint2(( cp14.getX() + cp6.getX() ) / 2, ( cp14.getY() + cp6.getY() ) / 2, ( cp14.getZ() + cp6.getZ() ) / 2 );
+    Vector3D cp14cp6( cp6.getX() - cp14.getX(), cp6.getY() - cp14.getY(), cp6.getZ() - cp14.getZ() );
+    Vector3D odir2( 0, 0, 0 );//direction orthogonal to the line from point 1 to point3
+    if (( point3.getY() - point1.getY() ) != 0 )//avoid division through zero
+    {
+      odir2.setX( 1 );
+      odir2.setY( -( point3.getX() - point1.getX() ) / ( point3.getY() - point1.getY() ) );
+      odir2.setZ(( der3X + der1X ) / 2 + ( der3Y + der1Y ) / 2*odir2.getY() );//take the linear interpolated cross-derivative
+    }
+    else
+    {
+      odir2.setY( 1 );
+      odir2.setX( -( point3.getY() - point1.getY() ) / ( point3.getX() - point1.getX() ) );
+      odir2.setZ(( der3X + der1X ) / 2*odir2.getX() + ( der3Y + der1Y ) / 2 );
+    }
+    Vector3D midpoint2cp11( 0, 0, 0 );
+    MathUtils::derVec( &cp14cp6, &odir2, &midpoint2cp11, cp11.getX() - midpoint2.getX(), cp11.getY() - midpoint2.getY() );
+    cp11.setZ( midpoint2.getZ() + midpoint2cp11.getZ() );
 
-      cp11.setX((point3.getX()+cp10.getX()+point1.getX())/3);
-      cp11.setY((point3.getY()+cp10.getY()+point1.getY())/3);
-      //find the point in the middle of the bezier curve between point3 and point2
-      Point3D midpoint2((cp14.getX()+cp6.getX())/2,(cp14.getY()+cp6.getY())/2,(cp14.getZ()+cp6.getZ())/2);
-      Vector3D cp14cp6(cp6.getX()-cp14.getX(),cp6.getY()-cp14.getY(),cp6.getZ()-cp14.getZ());
-      Vector3D odir2(0,0,0);//direction orthogonal to the line from point 1 to point3
-      if((point3.getY()-point1.getY())!=0)//avoid division through zero
- {
-   odir2.setX(1);
-   odir2.setY(-(point3.getX()-point1.getX())/(point3.getY()-point1.getY()));
-   odir2.setZ((der3X+der1X)/2+(der3Y+der1Y)/2*odir2.getY());//take the linear interpolated cross-derivative
- }
-      else
- {
-   odir2.setY(1);
-   odir2.setX(-(point3.getY()-point1.getY())/(point3.getX()-point1.getX()));
-   odir2.setZ((der3X+der1X)/2*odir2.getX()+(der3Y+der1Y)/2);
- }
-      Vector3D midpoint2cp11(0,0,0);
-      MathUtils::derVec(&cp14cp6,&odir2,&midpoint2cp11,cp11.getX()-midpoint2.getX(),cp11.getY()-midpoint2.getY());
-      cp11.setZ(midpoint2.getZ()+midpoint2cp11.getZ());
 
+    cp7.setX( cp10.getX() + ( point1.getX() - cp10.getX() ) / 3 );
+    cp7.setY( cp10.getY() + ( point1.getY() - cp10.getY() ) / 3 );
+    //cp7 has to be in the same plane as cp4, cp3 and cp11
+    Vector3D cp4cp3( cp3.getX() - cp4.getX(), cp3.getY() - cp4.getY(), cp3.getZ() - cp4.getZ() );
+    Vector3D cp4cp11( cp11.getX() - cp4.getX(), cp11.getY() - cp4.getY(), cp11.getZ() - cp4.getZ() );
+    Vector3D cp4cp7( 0, 0, 0 );
+    MathUtils::derVec( &cp4cp3, &cp4cp11, &cp4cp7, cp7.getX() - cp4.getX(), cp7.getY() - cp4.getY() );
+    cp7.setZ( cp4.getZ() + cp4cp7.getZ() );
 
-      cp7.setX(cp10.getX()+(point1.getX()-cp10.getX())/3);
-      cp7.setY(cp10.getY()+(point1.getY()-cp10.getY())/3);
-      //cp7 has to be in the same plane as cp4, cp3 and cp11
-      Vector3D cp4cp3(cp3.getX()-cp4.getX(), cp3.getY()-cp4.getY(), cp3.getZ()-cp4.getZ());
-      Vector3D cp4cp11(cp11.getX()-cp4.getX(), cp11.getY()-cp4.getY(), cp11.getZ()-cp4.getZ());
-      Vector3D cp4cp7(0,0,0);
-      MathUtils::derVec(&cp4cp3,&cp4cp11,&cp4cp7,cp7.getX()-cp4.getX(),cp7.getY()-cp4.getY());
-      cp7.setZ(cp4.getZ()+cp4cp7.getZ());
+    cp8.setX( cp10.getX() + ( point2.getX() - cp10.getX() ) / 3 );
+    cp8.setY( cp10.getY() + ( point2.getY() - cp10.getY() ) / 3 );
+    //cp8 has to be in the same plane as cp4, cp5 and cp13
+    Vector3D cp4cp5( cp5.getX() - cp4.getX(), cp5.getY() - cp4.getY(), cp5.getZ() - cp4.getZ() );
+    Vector3D cp4cp13( cp13.getX() - cp4.getX(), cp13.getY() - cp4.getY(), cp13.getZ() - cp4.getZ() );
+    Vector3D cp4cp8( 0, 0, 0 );
+    MathUtils::derVec( &cp4cp5, &cp4cp13, &cp4cp8, cp8.getX() - cp4.getX(), cp8.getY() - cp4.getY() );
+    cp8.setZ( cp4.getZ() + cp4cp8.getZ() );
 
-      cp8.setX(cp10.getX()+(point2.getX()-cp10.getX())/3);
-      cp8.setY(cp10.getY()+(point2.getY()-cp10.getY())/3);
-      //cp8 has to be in the same plane as cp4, cp5 and cp13
-      Vector3D cp4cp5(cp5.getX()-cp4.getX(), cp5.getY()-cp4.getY(), cp5.getZ()-cp4.getZ());
-      Vector3D cp4cp13(cp13.getX()-cp4.getX(), cp13.getY()-cp4.getY(), cp13.getZ()-cp4.getZ());
-      Vector3D cp4cp8(0,0,0);
-      MathUtils::derVec(&cp4cp5,&cp4cp13,&cp4cp8,cp8.getX()-cp4.getX(), cp8.getY()-cp4.getY());
-      cp8.setZ(cp4.getZ()+cp4cp8.getZ());
+    cp12.setX( cp10.getX() + ( point3.getX() - cp10.getX() ) / 3 );
+    cp12.setY( cp10.getY() + ( point3.getY() - cp10.getY() ) / 3 );
+    //cp12 has to be in the same plane as cp13, cp15 and cp11
+    Vector3D cp13cp11( cp11.getX() - cp13.getX(), cp11.getY() - cp13.getY(), cp11.getZ() - cp13.getZ() );
+    Vector3D cp13cp15( cp15.getX() - cp13.getX(), cp15.getY() - cp13.getY(), cp15.getZ() - cp13.getZ() );
+    Vector3D cp13cp12( 0, 0, 0 );
+    MathUtils::derVec( &cp13cp11, &cp13cp15, &cp13cp12, cp12.getX() - cp13.getX(), cp12.getY() - cp13.getY() );
+    cp12.setZ( cp13.getZ() + cp13cp12.getZ() );
 
-      cp12.setX(cp10.getX()+(point3.getX()-cp10.getX())/3);
-      cp12.setY(cp10.getY()+(point3.getY()-cp10.getY())/3);
-      //cp12 has to be in the same plane as cp13, cp15 and cp11
-      Vector3D cp13cp11(cp11.getX()-cp13.getX(), cp11.getY()-cp13.getY(), cp11.getZ()-cp13.getZ());
-      Vector3D cp13cp15(cp15.getX()-cp13.getX(), cp15.getY()-cp13.getY(), cp15.getZ()-cp13.getZ());
-      Vector3D cp13cp12(0,0,0);
-      MathUtils::derVec(&cp13cp11,&cp13cp15,&cp13cp12,cp12.getX()-cp13.getX(),cp12.getY()-cp13.getY());
-      cp12.setZ(cp13.getZ()+cp13cp12.getZ());
+    //cp10 has to be in the same plane as cp7, cp8 and cp12
+    Vector3D cp7cp8( cp8.getX() - cp7.getX(), cp8.getY() - cp7.getY(), cp8.getZ() - cp7.getZ() );
+    Vector3D cp7cp12( cp12.getX() - cp7.getX(), cp12.getY() - cp7.getY(), cp12.getZ() - cp7.getZ() );
+    Vector3D cp7cp10( 0, 0, 0 );
+    MathUtils::derVec( &cp7cp8, &cp7cp12, &cp7cp10, cp10.getX() - cp7.getX(), cp10.getY() - cp7.getY() );
+    cp10.setZ( cp7.getZ() + cp7cp10.getZ() );
 
-      //cp10 has to be in the same plane as cp7, cp8 and cp12
-      Vector3D cp7cp8(cp8.getX()-cp7.getX(), cp8.getY()-cp7.getY(), cp8.getZ()-cp7.getZ());
-      Vector3D cp7cp12(cp12.getX()-cp7.getX(), cp12.getY()-cp7.getY(), cp12.getZ()-cp7.getZ());
-      Vector3D cp7cp10(0,0,0);
-      MathUtils::derVec(&cp7cp8,&cp7cp12,&cp7cp10,cp10.getX()-cp7.getX(),cp10.getY()-cp7.getY());
-      cp10.setZ(cp7.getZ()+cp7cp10.getZ());
+    lpoint1 = point1;
+    lpoint2 = point2;
+    lpoint3 = point3;
+  }
 
-      lpoint1=point1;
-      lpoint2=point2;
-      lpoint3=point3;
-    }
-
   else
-    {
-      cout << "warning, null pointer in CloughTocherInterpolator::init" << endl << flush;
-    }
-}*/
+  {
+    QgsDebugMsg( "warning, null pointer" );
+  }
+}
+#endif
 
 
 

Modified: trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc
===================================================================
--- trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/analysis/interpolation/NormVecDecorator.cc	2009-11-07 23:32:12 UTC (rev 11991)
@@ -15,13 +15,14 @@
  ***************************************************************************/
 
 #include "NormVecDecorator.h"
+#include "qgslogger.h"
 
 NormVecDecorator::~NormVecDecorator()
 {
   //remove all the normals
   if ( mNormVec->count() > 0 )
   {
-    for ( unsigned int i = 0; i < mNormVec->count();i++ )
+    for ( int i = 0; i < mNormVec->count(); i++ )
     {
       delete( *mNormVec )[i];
     }
@@ -45,7 +46,7 @@
 
     if ( pointno == -100 )//a numerical error occured
     {
-      //cout << "warning, numerical error in NormVecDecorator::addPoint" << endl << flush;
+// QgsDebugMsg("warning, numerical error");
       return -100;
     }
 
@@ -73,6 +74,8 @@
     }
     return pointno;
   }
+
+  return -1;
 }
 
 bool NormVecDecorator::calcNormal( double x, double y, Vector3D* result )
@@ -90,7 +93,7 @@
   }
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::calcNormal" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -125,7 +128,7 @@
 
     if ((( vlist->count() ) % 4 ) != 0 )//number of items in vlist has to be a multiple of 4
     {
-      cout << "warning, wrong number of items in vlist in NormVecDecorator::calcNormalForPoint" << endl << flush;
+      QgsDebugMsg( "warning, wrong number of items in vlist" );
       return false;
     }
 
@@ -138,7 +141,7 @@
       numberofruns++;
       if ( numberofruns > limit )
       {
-        cout << "warning, a probable endless loop is detected in NormVecDecorator::calcNormalForPoint" << endl << flush;
+        QgsDebugMsg( "warning, a probable endless loop is detected" );
         return false;
       }
 
@@ -185,7 +188,7 @@
         {
           if ( pointfound == false )//the point with coordinates x, y was in no triangle
           {
-            cout << "warning: point (x,y) was in no triangle (NormVecDecorator::calcNormalForPoint)" << endl << flush;
+            QgsDebugMsg( "warning: point (x,y) was in no triangle" );
             return false;
           }
           result->standardise();
@@ -220,7 +223,7 @@
 
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::calcNormalForPoint" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 
@@ -242,7 +245,7 @@
   }
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::calcNormal" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -273,7 +276,7 @@
       }
       else
       {
-        cout << "warning, null pointer in NormVecDecorator::getTriangle(double,double,Point3D*,Vector3D*,Point3D*,Vector3D*,Point3D*,Vector3D*" << endl << flush;
+        QgsDebugMsg( "warning, null pointer" );
         delete nr1;
         delete nr2;
         delete nr3;
@@ -298,7 +301,7 @@
 
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::getTriangle" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -311,7 +314,7 @@
   }
   else
   {
-    cout << "warning, number below 0 in NormVecDecorator::getState" << endl << flush;
+    QgsDebugMsg( "warning, number below 0" );
     return mPointState->at( 0 );//just to avoid a compiler warning
   }
 }
@@ -345,14 +348,14 @@
     }
     else
     {
-      cout << "warning, getTriangle returned false in NormVecDecorator::getTriangle" << endl << flush;
+      QgsDebugMsg( "warning, getTriangle returned false" );
       return false;
     }
 
   }
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::getTriangle" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -381,7 +384,7 @@
     //something went wrong in getSurroundingTriangles, set the normal to (0,0,0)
     if ( mNormVec->size() <= mNormVec->count() )//allocate more memory if neccessary
     {
-      cout << "resizing mNormVec from " << mNormVec->size() << " to " << mNormVec->size() + 1 << endl << flush;
+      QgsDebugMsg( QString( "resizing mNormVec from %1 to %2" ).arg( mNormVec->size() ).arg( mNormVec->size() + 1 ) );
       mNormVec->resize( mNormVec->size() + 1 );
     }
 
@@ -401,9 +404,9 @@
     return false;
   }
 
-  if ((( vlist->count() ) % 4 ) != 0 )//number of items in vlist has to be a multiple of 4
+  if (( vlist->count() % 4 ) != 0 ) //number of items in vlist has to be a multiple of 4
   {
-    cout << "warning, wrong number of items in vlist in NormVecDecorator::estimateFirstDerivatives" << endl << flush;
+    QgsDebugMsg( "warning, wrong number of items in vlist" );
     return false;
   }
 
@@ -479,7 +482,7 @@
   //insert the new calculated vector
   if ( mNormVec->size() <= mNormVec->count() )//allocate more memory if neccessary
   {
-    cout << "resizing mNormVec from " << mNormVec->size() << " to " << mNormVec->size() + 1 << endl << flush;
+    QgsDebugMsg( QString( "resizing mNormVec from %1 to %2" ).arg( mNormVec->size() ).arg( mNormVec->size() + 1 ) );
     mNormVec->resize( mNormVec->size() + 1 );
   }
 
@@ -499,7 +502,7 @@
 
   if ( pointno >= mPointState->size() )
   {
-    cout << "resizing mPointState from " << mPointState->size() << " to " << mPointState->size() + 1 << endl << flush;
+    QgsDebugMsg( QString( "resizing mPointState from %1 to %2" ).arg( mPointState->size() ).arg( mPointState->size() + 1 ) );
     mPointState->resize( mPointState->size() + 1 );
   }
 
@@ -511,7 +514,7 @@
 //weighted method of little
 bool NormVecDecorator::estimateFirstDerivatives()
 {
-  for ( int i = 0;i < getNumberOfPoints();i++ )
+  for ( int i = 0; i < getNumberOfPoints(); i++ )
   {
     estimateFirstDerivative( i );
   }
@@ -535,7 +538,7 @@
   }
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::eliminateHorizontalTriangles" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -547,7 +550,7 @@
   }
   else
   {
-    cout << "warning, pointno>0 in NormVecDecorator::setState" << endl << flush;
+    QgsDebugMsg( "warning, pointno>0" );
   }
 }
 
@@ -555,7 +558,7 @@
 {
   if ( mTIN )
   {
-    bool b;
+    bool b = false;
     if ( alreadyestimated )
     {
       QList<int>* list = getPointsAroundEdge( x, y );
@@ -563,7 +566,7 @@
       {
         b = mTIN->swapEdge( x, y );
         QList<int>::iterator it;
-        for ( it = list->begin();it != list->end();++it )
+        for ( it = list->begin(); it != list->end(); ++it )
         {
           estimateFirstDerivative(( *it ) );
         }
@@ -578,7 +581,7 @@
   }
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::swapEdge" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }

Modified: trunk/qgis/src/analysis/interpolation/NormVecDecorator.h
===================================================================
--- trunk/qgis/src/analysis/interpolation/NormVecDecorator.h	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/analysis/interpolation/NormVecDecorator.h	2009-11-07 23:32:12 UTC (rev 11991)
@@ -17,11 +17,10 @@
 #ifndef NORMVECDECORATOR_H
 #define NORMVECDECORATOR_H
 
-using namespace std;
-
 #include "TriDecorator.h"
 #include <TriangleInterpolator.h>
 #include <MathUtils.h>
+#include "qgslogger.h"
 
 /**Decorator class which adds the functionality of estimating normals at the data points*/
 class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator
@@ -99,7 +98,7 @@
   }
   else
   {
-    cout << "warning, null pointer in NormVecDecorator::getNormal" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }

Modified: trunk/qgis/src/analysis/interpolation/TriDecorator.cc
===================================================================
--- trunk/qgis/src/analysis/interpolation/TriDecorator.cc	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/analysis/interpolation/TriDecorator.cc	2009-11-07 23:32:12 UTC (rev 11991)
@@ -15,6 +15,7 @@
  ***************************************************************************/
 
 #include "TriDecorator.h"
+#include "qgslogger.h"
 
 void TriDecorator::addLine( Line3D* line, bool breakline )
 {
@@ -24,7 +25,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::addLine" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -37,7 +38,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::addPoint" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -50,7 +51,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::performConsistencyTest" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -63,7 +64,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::calcNormal" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -77,7 +78,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::calcPoint" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -91,7 +92,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getPoint" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -105,7 +106,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getTriangle" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -119,7 +120,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getTriangle" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -132,7 +133,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getNumberOfPoints" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -146,7 +147,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getOppositePoint" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -160,7 +161,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getSurroundingTriangles" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -174,7 +175,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getXMax" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -188,7 +189,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getXMin" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -201,7 +202,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getYMax" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -215,7 +216,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getYMin" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }
@@ -228,7 +229,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::setForcedCrossBehaviour" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -240,7 +241,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::setEdgeColor" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -252,7 +253,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::setForcedEdgeColor" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -264,7 +265,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::setBreakEdgeColor" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -276,7 +277,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::setTriangleInterpolator" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -288,7 +289,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::swapHorizontalTriangles" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -300,7 +301,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::ruppertRefinement" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
   }
 }
 
@@ -313,7 +314,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::pointInside" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -327,7 +328,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::swapEdge" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return false;
   }
 }
@@ -340,7 +341,7 @@
   }
   else
   {
-    cout << "warning, null pointer in TriDecorator::getPointsAroundEdge" << endl << flush;
+    QgsDebugMsg( "warning, null pointer" );
     return 0;
   }
 }

Modified: trunk/qgis/src/analysis/interpolation/TriDecorator.h
===================================================================
--- trunk/qgis/src/analysis/interpolation/TriDecorator.h	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/analysis/interpolation/TriDecorator.h	2009-11-07 23:32:12 UTC (rev 11991)
@@ -17,8 +17,6 @@
 #ifndef TRIDECORATOR_H
 #define TRIDECORATOR_H
 
-using namespace std;
-
 #include "Triangulation.h"
 
 /**Decorator class for Triangulations (s. Decorator pattern in Gamma et al.)*/
@@ -81,6 +79,4 @@
   mTIN = t;
 }
 
-#endif
-
-
+#endif
\ No newline at end of file

Modified: trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.h
===================================================================
--- trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.h	2009-11-07 23:27:19 UTC (rev 11990)
+++ trunk/qgis/src/plugins/gps_importer/qgsgpsplugingui.h	2009-11-07 23:32:12 UTC (rev 11991)
@@ -58,18 +58,18 @@
     void on_pbnDLOutput_clicked();
 
   private:
-
     void populateDeviceComboBox();
     void populateULLayerComboBox();
     void populateIMPBabelFormats();
     void populatePortComboBoxes();
+#if 0
     void populateLoadDialog();
-    /*
     void populateDLDialog();
     void populateULDialog();
     void populateIMPDialog();
     void populateCONVDialog();
-    */
+#endif
+
   private slots:
 
     void on_pbnRefresh_clicked();



More information about the QGIS-commit mailing list