Skip to content

Commit 74306c7

Browse files
authored
[analysis] fix derivative filter z factor handling (#5073)
1 parent 3ef008c commit 74306c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/analysis/raster/qgsderivativefilter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ float QgsDerivativeFilter::calcFirstDerX( float* x11, float* x21, float* x31, fl
9292
return mOutputNodataValue;
9393
}
9494

95-
return sum / ( weight * mCellSizeX * mZFactor );
95+
return sum / ( weight * mCellSizeX ) * mZFactor;
9696
}
9797

9898
float QgsDerivativeFilter::calcFirstDerY( float* x11, float* x21, float* x31, float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
@@ -159,7 +159,7 @@ float QgsDerivativeFilter::calcFirstDerY( float* x11, float* x21, float* x31, fl
159159
return mOutputNodataValue;
160160
}
161161

162-
return sum / ( weight * mCellSizeY * mZFactor );
162+
return sum / ( weight * mCellSizeY ) * mZFactor;
163163
}
164164

165165

0 commit comments

Comments
 (0)