Skip to content
Permalink
Browse files
fix total curvature calculation (fix #5967)
  • Loading branch information
alexbruy committed May 20, 2015
1 parent 8ad1883 commit a62adfe45a53328c8c5ac4c3b15d6a929c60570c
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/analysis/raster/qgstotalcurvaturefilter.cpp
@@ -41,8 +41,8 @@ float QgsTotalCurvatureFilter::processNineCellWindow( float* x11, float* x21, fl

double cellSizeAvg = ( mCellSizeX + mCellSizeY ) / 2.0;
double dxx = ( *x32 - 2 * *x22 + *x12 ) / ( mCellSizeX * mCellSizeX );
double dyy = ( -*x11 + *x31 + *x13 - *x33 ) / ( 4 * cellSizeAvg * cellSizeAvg );
double dxy = ( *x21 - 2 * *x22 + *x23 ) / ( mCellSizeY * mCellSizeY );
double dxy = ( -*x11 + *x31 + *x13 - *x33 ) / ( 4 * cellSizeAvg * cellSizeAvg );
double dyy = ( *x21 - 2 * *x22 + *x23 ) / ( mCellSizeY * mCellSizeY );

return dxx*dxx + 2*dxy*dxy + dyy*dyy;
}

0 comments on commit a62adfe

Please sign in to comment.