Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix total curvature calculation (fix #5967)
  • Loading branch information
alexbruy committed May 20, 2015
1 parent 8ad1883 commit a62adfe
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 a62adfe

Please sign in to comment.