Skip to content

Commit b7a4e98

Browse files
committed
Merge pull request #2048 from alexbruy/fix-curvature-filter
fix total curvature calculation (fix #5967)
2 parents b7a2a79 + a62adfe commit b7a4e98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/analysis/raster/qgstotalcurvaturefilter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ float QgsTotalCurvatureFilter::processNineCellWindow( float* x11, float* x21, fl
4141

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

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

0 commit comments

Comments
 (0)