2

I'm smoothing a 2 meter DEM using the Gaussian filter in SAGA through QGIS/Processing and the smallest amount for the smoothing of the Standard Deviation value of 1 which for me is too much, it all gets way too blurred. Is there another way of smoothing my DEM with either another approach (I use Mac) or tweaking SAGA so that the smoothing will be less?

I guess one way would be to resample my data to 1 m DEM and then run the filter again?

DEM DEM

DEM with gaussian DEM with gaussian SD 1

2

according to the SAGA documentation, the standard deviation value can be in the range 0.0001 or more - I see what you're seeing, the GUI only allows integer values. The window size has to be an integer, but not the standard deviation.

The problem seems to be the definition file that tells Processing what parameters to put in the dialog box, specifically the line

ParameterNumber|SIGMA|Standard Deviation|None|None|1

If that line's changed to

ParameterNumber|SIGMA|Standard Deviation|None|None|1.0

the dialog will allow floating point values for the sigma parameter.

You could - if you're feeling brave - locate and edit this file in your local install. Not ideal, you may need to be administrator to edit the file, and will lose the change if you upgrade QGIS and/or SAGA. I had lots of copies of this file lying around, from different versions of QGIS and SAGA installed over the years...

Or you could try running it from python console, which is safer, something like...

import processing
processing.runalg("saga:gaussianfilter","myraster.tif",0.05,0,3,None)

This looks worth raising a pull request for as this looks like a bug.

  • Yes! I edited the GaussianFilter.txt file and now it works! And yes I agree, this is likely a bug. Will you report it/submit a pull request for this? – oskarlin Apr 6 '17 at 22:00
  • excellent! I couldn't see any open issues for this on tracker, so you may be the first person to notice ;-) It's a fairly small change so I'll put in a PR for this (good excuse for me to try this process out) – Steven Kay Apr 6 '17 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.