Skip to content
Permalink
Browse files
Fix for shifted values in interpolation plugin
git-svn-id: http://svn.osgeo.org/qgis/trunk@11759 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Oct 6, 2009
1 parent 7a1091a commit 214146b1b5acc85f3663f9f582cb480bab994644
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/analysis/interpolation/qgsgridfilewriter.cpp
@@ -55,7 +55,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog )
outStream.setRealNumberPrecision( 8 );
writeHeader( outStream );

double currentYValue = mInterpolationExtent.yMaximum();
double currentYValue = mInterpolationExtent.yMaximum() - mCellSizeY / 2.0; //calculate value in the center of the cell
double currentXValue;
double interpolatedValue;

@@ -68,7 +68,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog )

for ( int i = 0; i < mNumRows; ++i )
{
currentXValue = mInterpolationExtent.xMinimum();
currentXValue = mInterpolationExtent.xMinimum() + mCellSizeX / 2.0; //calculate value in the center of the cell
for ( int j = 0; j < mNumColumns; ++j )
{
if ( mInterpolator->interpolatePoint( currentXValue, currentYValue, interpolatedValue ) == 0 )

0 comments on commit 214146b

Please sign in to comment.