[QGIS Commit] r11214 - trunk/qgis/src/plugins/interpolation
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Jul 30 08:44:04 EDT 2009
Author: mhugent
Date: 2009-07-30 08:44:03 -0400 (Thu, 30 Jul 2009)
New Revision: 11214
Modified:
trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.cc
trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.h
trunk/qgis/src/plugins/interpolation/qgsinterpolator.cpp
Log:
Some bugfixes for interpolation plugin
Modified: trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.cc
===================================================================
--- trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.cc 2009-07-30 11:55:48 UTC (rev 11213)
+++ trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.cc 2009-07-30 12:44:03 UTC (rev 11214)
@@ -77,7 +77,7 @@
for ( i = 0;i < line->getSize();i++ )
{
line->goToNext();
- actpoint = /*mDecorator->*/addPoint( line->getPoint() );
+ actpoint = mDecorator->addPoint( line->getPoint() );
if ( actpoint != -100 )
{
i++;
@@ -94,7 +94,7 @@
for ( ;i < line->getSize();i++ )
{
line->goToNext();
- currentpoint = /*mDecorator->*/addPoint( line->getPoint() );
+ currentpoint = mDecorator->addPoint( line->getPoint() );
if ( currentpoint != -100 && actpoint != -100 && currentpoint != actpoint )//-100 is the return value if the point could not be not inserted
{
insertForcedSegment( actpoint, currentpoint, breakline );
Modified: trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.h
===================================================================
--- trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.h 2009-07-30 11:55:48 UTC (rev 11213)
+++ trunk/qgis/src/plugins/interpolation/DualEdgeTriangulation.h 2009-07-30 12:44:03 UTC (rev 11214)
@@ -43,6 +43,7 @@
DualEdgeTriangulation();
DualEdgeTriangulation( int nop, Triangulation* decorator );
virtual ~DualEdgeTriangulation();
+ void setDecorator(Triangulation* d){mDecorator = d;}
/**Adds a line (e.g. a break-, structure- or an isoline) to the triangulation. The class takes ownership of the line object and its points*/
void addLine( Line3D* line, bool breakline );
/**Adds a point to the triangulation and returns the number of this point in case of success or -100 in case of failure*/
@@ -191,6 +192,10 @@
{
mPointVector.reserve( nop );
mHalfEdge.reserve( nop );
+ if(!mDecorator)
+ {
+ mDecorator = this;
+ }
}
inline double DualEdgeTriangulation::getXMax() const
Modified: trunk/qgis/src/plugins/interpolation/qgsinterpolator.cpp
===================================================================
--- trunk/qgis/src/plugins/interpolation/qgsinterpolator.cpp 2009-07-30 11:55:48 UTC (rev 11213)
+++ trunk/qgis/src/plugins/interpolation/qgsinterpolator.cpp 2009-07-30 12:44:03 UTC (rev 11214)
@@ -359,5 +359,6 @@
default:
break;
}
+ mDataIsCached = true;
return 0;
}
More information about the QGIS-commit
mailing list