Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 214146b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis/interpolation/qgsgridfilewriter.cpp
Expand Up @@ -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;

Expand All @@ -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 )
Expand Down

0 comments on commit 214146b

Please sign in to comment.