File tree 1 file changed +2
-2
lines changed
src/analysis/interpolation
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog )
55
55
outStream.setRealNumberPrecision ( 8 );
56
56
writeHeader ( outStream );
57
57
58
- double currentYValue = mInterpolationExtent .yMaximum ();
58
+ double currentYValue = mInterpolationExtent .yMaximum () - mCellSizeY / 2.0 ; // calculate value in the center of the cell
59
59
double currentXValue;
60
60
double interpolatedValue;
61
61
@@ -68,7 +68,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog )
68
68
69
69
for ( int i = 0 ; i < mNumRows ; ++i )
70
70
{
71
- currentXValue = mInterpolationExtent .xMinimum ();
71
+ currentXValue = mInterpolationExtent .xMinimum () + mCellSizeX / 2.0 ; // calculate value in the center of the cell
72
72
for ( int j = 0 ; j < mNumColumns ; ++j )
73
73
{
74
74
if ( mInterpolator ->interpolatePoint ( currentXValue, currentYValue, interpolatedValue ) == 0 )
You can’t perform that action at this time.
0 commit comments