Skip to content

Commit

Permalink
[analysis] fix derivative filter z factor handling (#5073)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Aug 25, 2017
1 parent 3ef008c commit 74306c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis/raster/qgsderivativefilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ float QgsDerivativeFilter::calcFirstDerX( float* x11, float* x21, float* x31, fl
return mOutputNodataValue;
}

return sum / ( weight * mCellSizeX * mZFactor );
return sum / ( weight * mCellSizeX ) * mZFactor;
}

float QgsDerivativeFilter::calcFirstDerY( float* x11, float* x21, float* x31, float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
Expand Down Expand Up @@ -159,7 +159,7 @@ float QgsDerivativeFilter::calcFirstDerY( float* x11, float* x21, float* x31, fl
return mOutputNodataValue;
}

return sum / ( weight * mCellSizeY * mZFactor );
return sum / ( weight * mCellSizeY ) * mZFactor;
}


Expand Down

0 comments on commit 74306c7

Please sign in to comment.