Skip to content

Commit

Permalink
Merge pull request #2048 from alexbruy/fix-curvature-filter
Browse files Browse the repository at this point in the history
fix total curvature calculation (fix #5967)
  • Loading branch information
mhugent committed May 25, 2015
2 parents b7a2a79 + a62adfe commit b7a4e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis/raster/qgstotalcurvaturefilter.cpp
Expand Up @@ -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 b7a4e98

Please sign in to comment.