Bug report #14735

SagaAlgorithm since Saga 2.2.4: RESAMPLING instead of INTERPOL

Added by Max Bohnet about 3 years ago. Updated almost 2 years ago.

Status:Rejected
Priority:Normal
Assignee:-
Category:Unknown
Affected QGIS version:2.14.8 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:22693

Description

I have Saga 2.2.6 installed with QGIS 2.14.1 on linux.
Since Saga version 2.2.4 the name of the parameter "INTERPOL" changed to "RESAMPLING" in "io_gdal 0".
This is called by nearly all raster tools of the qgis saga geoalgorithms.

I could bypass the problem by adding a
SagaAlgorithm224.py (copy the SagaAlgorithm214.py)

,changing line 64 from
return 'io_gdal 0 -TRANSFORM 1 -INTERPOL 0 ...
to
return 'io_gdal 0 -TRANSFORM 1 -RESAMPLING 0 ...

,and adding the SagaAlgorithm224 Class to the SagaAlgorithmProvider.py module as Supported version
and creating a symlink from the description folder 2.2.3 to 2.2.4, 2.2.5 and 2.2.6 in the /usr/share/qgis/python/plugins/processing/algs/saga/description folder
(knowing that the Descriptions then points to the wrong version).

Is a support for saga 2.2.4 or newer versions in qgis planned?


Related issues

Duplicates QGIS Application - Bug report #13279: Processing & SAGA Closed 2015-08-28

History

#1 Updated by Alexander Bruy about 3 years ago

  • Resolution set to duplicate
  • Status changed from Open to Rejected

This known issue with SAGA. SAGA devs break API in every minor version making maintenance really hard.

#2 Updated by gcarrillo - over 2 years ago

  • Affected QGIS version changed from 2.14.1 to 2.14.8

Just leaving my temporary way to solve this (for reference). In SagaAlgorithm214.py:

from SagaUtils import getSagaInstalledVersion

...

if getSagaInstalledVersion() >= "2.2.4":
    return 'io_gdal 0 -TRANSFORM 1 -RESAMPLING 0 -GRIDS "' + destFilename + '" -FILES "' + source + '"'
else:
    return 'io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "' + destFilename + '" -FILES "' + source + '"'

#3 Updated by Paolo Cavallini over 2 years ago

RESAMPLING is already the default, so it can be removed safely

#4 Updated by Pedro Venâncio over 2 years ago

In QGIS 3, the temporary solution is similar. In SagaAlgorithm214.py:

from .SagaUtils import getInstalledVersion

...
        if getInstalledVersion() >= "2.2.4":
            return 'io_gdal 0 -TRANSFORM 1 -RESAMPLING 0 -GRIDS "' + destFilename + '" -FILES "' + source + '"'
        else:
            return 'io_gdal 0 -TRANSFORM 1 -INTERPOL 0 -GRIDS "' + destFilename + '" -FILES "' + source + '"'

#5 Updated by Jürgen Fischer almost 2 years ago

  • Category set to Unknown

Also available in: Atom PDF