Bug report #22118

Majority filter (SAGA) returns erroneous results if input is .tif

Added by andre mano 5 months ago. Updated 5 months ago.

Status:Closed
Priority:High
Assignee:-
Category:Processing/SAGA
Affected QGIS version:3.4.5 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:29931

Description

When using the majority filter from SAGA, the results seem to be wrong (open attached project for example). This problem occurs if the input raster has the .tif extension. If the extension is .sdat the results are correct (just like in SAGA native). I did not test if this problem occurs with other raster extensions.

I did test it in QGIS 2.8 and the problem is there too (no regression)

majority_filter_saga.zip (218 KB) andre mano, 2019-05-21 09:56 PM

History

#1 Updated by Alexander Bruy 5 months ago

  • Resolution set to invalid
  • Operating System deleted (Windows)
  • Status changed from Open to Closed

Looking at your data it seem you are using two SAGA versions, some files created with 2.3.2 while others are created with 7.2.0. Moreover different setting were used, namely resampling method. This explains why you get different results.
If only SAGA 2.3.2 used then outputs produced from TIF and SGRD are identical.

#2 Updated by andre mano 5 months ago

Thanks Alexander.

However I am intrigued with one thing - I did not set any resampling method, I just ran the tool with the default settings. Is there a way to control the resampling method?

Also available in: Atom PDF