Skip to content

Commit 0507143

Browse files
committed
[analysis] fix derivative filter z factor handling
1 parent 233f25a commit 0507143

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
@@ -87,7 +87,7 @@ float QgsDerivativeFilter::calcFirstDerX( float *x11, float *x21, float *x31, fl
8787
return mOutputNodataValue;
8888
}
8989

90-
return sum / ( weight * mCellSizeX * mZFactor );
90+
return sum / ( weight * mCellSizeX ) * mZFactor;
9191
}
9292

9393
float QgsDerivativeFilter::calcFirstDerY( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 )
@@ -154,7 +154,7 @@ float QgsDerivativeFilter::calcFirstDerY( float *x11, float *x21, float *x31, fl
154154
return mOutputNodataValue;
155155
}
156156

157-
return sum / ( weight * mCellSizeY * mZFactor );
157+
return sum / ( weight * mCellSizeY ) * mZFactor;
158158
}
159159

160160

0 commit comments

Comments
 (0)