Bug report #17067

QgsHillshadeFilter (and possibly other raster filters) ignores Z factor value

Added by Mathieu Pellerin - nIRV about 7 years ago. Updated about 7 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Rasters
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24966

Description

While testing raster processing algorithms, I've noticed that the native hillshade as well as slope algorithms ignore the Z factor value entered. It's not a processing issue, as a very simple script run through the python console confirms the Z factor issue.

Using a DEM, try running the following code (obviously, replace paths with a valid DEM on your machine):

r = QgsHillshadeFilter('/media/webmaster/Data/Gis/SMRT-1arc/n11_e103_1arc_v3.bil','/home/webmaster/Desktop/output_1.tif','gtiff')
r.setZFactor(0.00004)
r.processRaster()

Then, run the same script, but change the Z factor value:

r = QgsHillshadeFilter('/media/webmaster/Data/Gis/SMRT-1arc/n11_e103_1arc_v3.bil','/home/webmaster/Desktop/output_2.tif','gtiff')
r.setZFactor(2)
r.processRaster()

Compare both results, you'll notice the two files are exactly the same.

History

#1 Updated by Nyall Dawson about 7 years ago

This can be closed now, right?

#2 Updated by Nyall Dawson about 7 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Also available in: Atom PDF