Using QGIS 1.8.0 and SAGA When trying to use the IDW function from SEXTANTE SAGA 2.1.0 64-bit, I get the following error: Could not load layer: C:/test.tif.

This error seems mysterious to me, any ideas?

enter image description here

SEXTANTE error logs

With vector layer loaded as a PostGIS layer:

Could not load model watersheds.model ALGORITHM:ftools:export/addgeometrycolumns

sextante.runalg("saga:inversedistanceweighted","dbname='mydb' host=www.mywebsite.com port=5432 user='postgres' password='mypassword' sslmode=disable key='id' estimatedmetadata=true srid=2163 type=POINT table="analysis"."scores" (geom) sql=","score",0,0,2,1,0,100,0,0,10,"2297980.75,2325375.5,108272.492188,134982.28125",0,None)

With vector layer loaded as a shapefile:



I am using QGIS 1.8.0 with SAGA 2.1 b3 64-bit on Windows 8 64-bit.

No problems running it directly in SAGA without SEXTANTE

I can't figure out how to import the raster .sgrd file back into QGIS... Somehow the points loaded into SAGA are skewed at an angle.. that's for another question

enter image description here


Updated to QGIS v.1.9.90. When activating SAGA under SEXTANTE, I get the following error. I get the same error when I choose any of SAGA's function under SEXTANTE's toolbox.

An error has occurred while executing Python code:

Traceback (most recent call last):
  File "C:\Users\0_o/.qgis2/python/plugins\sextante\gui\SextanteToolbox.py", line 138, in executeAlgorithm
    dlg = ParametersDialog(alg)
  File "C:\Users\0_o/.qgis2/python/plugins\sextante\gui\ParametersDialog.py", line 43, in __init__
    self.paramTable = ParametersPanel(self, alg)
  File "C:\Users\0_o/.qgis2/python/plugins\sextante\gui\ParametersPanel.py", line 74, in __init__
  File "C:\Users\0_o/.qgis2/python/plugins\sextante\gui\ParametersPanel.py", line 116, in initGUI
    widget = self.getWidgetFromParameter(param)
  File "C:\Users\0_o/.qgis2/python/plugins\sextante\gui\ParametersPanel.py", line 257, in getWidgetFromParameter
    item.addItems(self.getFields(layers[0], param.datatype))
  File "C:\Users\0_o/.qgis2/python/plugins\sextante\gui\ParametersPanel.py", line 325, in getFields
    for idx, field in fieldMap.iteritems():
AttributeError: 'QgsFields' object has no attribute 'iteritems'

Python version:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]

QGIS version:
1.9.0-Master Master, 404d89f

Python path: ['C:\\Users\\0_o/.qgis2/python/plugins\\sextante', 'C:/OSGeo4W/apps/qgis-dev/./python', 'C:\\Users\\0_o/.qgis2/python', 'C:\\Users\\0_o/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\\OSGeo4W\\bin\\python27.zip', 'C:\\OSGeo4W\\apps\\Python27\\DLLs', 'C:\\OSGeo4W\\apps\\Python27\\lib', 'C:\\OSGeo4W\\apps\\Python27\\lib\\plat-win', 'C:\\OSGeo4W\\apps\\Python27\\lib\\lib-tk', 'C:\\OSGeo4W\\bin', 'C:\\OSGeo4W\\apps\\Python27', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\OSGeo4W\\apps\\qgis-dev\\python\\plugins\\fTools\\tools', 'C:/Users/0_o/Desktop/test/Scores']

Update #2

Tried an older version of QGIS 1.9.0 298f0c0

SAGA execution console output

SAGA execution console output

C:\>set SAGA=C:\Program Files\saga

C:\>set SAGA_MLB=C:\Program Files\saga\modules

C:\>PATH=PATH;C:\Program Files\saga;C:\Program Files\saga\modules

C:\>saga_cmd grid_gridding "Inverse Distance Weighted" -SHAPES "C:/Users/0_o/Desktop/mytest/Scores/MA Full test/MA Scores.shp" -FIELD "score" -TARGET 0 -WEIGHTING 0 -POWER 2 -BANDWIDTH 1 -RANGE 0 -RADIUS 100 -MODE 0 -POINTS 0 -NPOINTS 10 -USER_XMIN 2135113.26163 -USER_XMAX 2341329.19555 -USER_YMIN 88475.4178879 -USER_YMAX 185492.363448 -USER_SIZE 80 -USER_GRID "C:\Users\0_o\AppData\Local\Temp\sextante\MA IDW.tif.sgrd"
Unknown option 'POWER'
Usage: saga_cmd -SHAPES <str> [-FIELD <str>] [-TARGET <str>] [-SEARCH_RANGE <str>] [-SEARCH_RADIUS <str>] [-SEARCH_POINTS_ALL <str>] [-SEARCH_POINTS_MAX <num>] [-SEARCH_DIRECTION <str>] [-WEIGHTING <str>] [-WEIGHT_POWER <str>] [-WEIGHT_BANDWIDTH <str>] [-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_GRID <str>] [-GRID_GRID <str>]
-SHAPES:<str>               Points
Shapes (input)
-FIELD:<str>                Attribute
Table field
-TARGET:<str>               Target Grid
Available Choices:
[0] user defined
[1] grid
-SEARCH_RANGE:<str>         Search Range
Available Choices:
[0] local
[1] global
-SEARCH_RADIUS:<str>        Maximum Search Distance
Floating point
Minimum: 0.000000
-SEARCH_POINTS_ALL:<str>    Number of Points
Available Choices:
[0] maximum number of nearest points
[1] all points within search distance
-SEARCH_POINTS_MAX:<num>    Maximum Number of Points
Minimum: 1.000000
-SEARCH_DIRECTION:<str>     Search Direction
Available Choices:
[0] all directions
[1] quadrants
-WEIGHTING:<str>            Distance Weighting
Available Choices:
[0] inverse distance to a power
[1] linearly decreasing within search radius
[2] exponential weighting scheme
[3] gaussian weighting scheme
-WEIGHT_POWER:<str>         Power
Floating point
-WEIGHT_BANDWIDTH:<str>     Bandwidth
Floating point
Minimum: 0.000000
-USER_XMIN:<str>            Left
Floating point
-USER_XMAX:<str>            Right
Floating point
-USER_YMIN:<str>            Bottom
Floating point
-USER_YMAX:<str>            Top
Floating point
-USER_SIZE:<str>            Cellsize
Floating point
Minimum: 0.000000
-USER_GRID:<str>            Grid
Data Object (optional output)
-GRID_GRID:<str>            Grid
Grid (output)

C:\>saga_cmd io_gdal 1 -GRIDS "C:\Users\0_o\AppData\Local\Temp\sextante\MA IDW.tif.sgrd" -FORMAT 1 -TYPE 0 -FILE "C:/Users/0_o/Desktop/mytest/Scores/MA Full test/MA IDW.tif"

error: Grid file could not be opened.

error: input file [C:\Users\0_o\AppData\Local\Temp\sextante\MA IDW.tif.sgrd]

error: empty input list [GRIDS]
Usage: saga_cmd -GRIDS <str> [-FILE <str>] [-FORMAT <str>] [-TYPE <str>] [-OPTIONS <str>]
-GRIDS:<str>    Grid(s)
Grid list (input)
-FILE:<str>     File
File path
-FORMAT:<str>   Format
Available Choices:
[0] ERDAS JPEG2000 (SDK 3.x)
[1] Flexible Image Transport System
[2] Network Common Data Format
[3] Virtual Raster
[4] GeoTIFF
[5] National Imagery Transmission Format
[6] Erdas Imagine Images (.img)
[7] ELAS
[8] In Memory Raster
[9] MS Windows Device Independent Bitmap
[10] PCIDSK Database File
[11] ILWIS Raster Map
[12] SGI Image File Format 1.0
[13] Leveller heightfield
[14] Terragen heightfield
[15] USGS Astrogeology ISIS cube (Version 2)
[16] ERMapper .ers Labelled
[17] Raster Matrix Format
[18] Idrisi Raster A.1
[19] Intergraph Raster
[20] Golden Software Binary Grid (.grd)
[21] Portable Pixmap Format (netpbm)
[22] ENVI .hdr Labelled
[23] ESRI .hdr Labelled
[24] PCI .aux Labelled
[25] Vexcel MFF Raster
[26] Vexcel MFF2 (HKV) Raster
[27] VTP .bt (Binary Terrain) 1.3 Format
[28] Erdas .LAN/.GIS
[29] Image Data and Analysis
[30] NOAA Vertical Datum .GTX
[31] NTv2 Datum Grid Shift
[32] ARC Digitized Raster Graphics
[33] SAGA GIS Binary Grid (.sdat)
-TYPE:<str>     Data Type
Available Choices:
[0] match input data
[1] 8 bit unsigned integer
[2] 16 bit unsigned integer
[3] 16 bit signed integer
[4] 32 bit unsigned integer
[5] 32 bit signed integer
[6] 32 bit floating point
[7] 64 bit floating point
-OPTIONS:<str>  Creation Options


SAGA execution commands

SAGA execution commands
grid_gridding "Inverse Distance Weighted" -SHAPES "C:/Users/0_o/Desktop/mytest/Scores/MA Full test/MA Scores.shp" -FIELD "score" -TARGET 0 -WEIGHTING 0 -POWER 2 -BANDWIDTH 1 -RANGE 0 -RADIUS 100 -MODE 0 -POINTS 0 -NPOINTS 10 -USER_XMIN 2135113.26163 -USER_XMAX 2341329.19555 -USER_YMIN 88475.4178879 -USER_YMAX 185492.363448 -USER_SIZE 80 -USER_GRID "C:\Users\0_o\AppData\Local\Temp\sextante\MA IDW.tif.sgrd"
io_gdal 1 -GRIDS "C:\Users\0_o\AppData\Local\Temp\sextante\MA IDW.tif.sgrd" -FORMAT 1 -TYPE 0 -FILE "C:/Users/0_o/Desktop/mytest/Scores/MA Full test/MA IDW.tif"
  • 1
    Does it work if you create a temporary raster layer instead of specifying a path?
    – underdark
    Apr 19, 2013 at 6:14
  • It still gives the same error using a temporary raster layer
    – Nyxynyx
    Apr 19, 2013 at 14:42
  • so what does the SEXTANTE log say?
    – Curlew
    Apr 19, 2013 at 14:58
  • @Curlew Updated question with SEXTANTE logs
    – Nyxynyx
    Apr 19, 2013 at 17:24

1 Answer 1


two things:

first, i recommend to you use the latest QGIS master with the latest SEXTANTE.

Second, enable SAGA logging in the SEXTANTE configuration options, so you can share with us what is happeningn in SAGA (the log you pasted is not the SAGA console output)

Hope this helps

  • Updated my question with the new error after installing QGIS v1.9.0 MASTER and enabling the SAGA log
    – Nyxynyx
    Apr 20, 2013 at 5:35
  • Used another older build of QGIS 1.9.0, getting a different error. At least SAGA is loading into Sextante toolbar now.
    – Nyxynyx
    Apr 20, 2013 at 5:56
  • I am afraid that your older version of SEXTANTE is conflicting with the new one. Delete the C:\Users\0_o/.qgis2/python/plugins\sextante folder to eliminate the previous version (I guess you installed it using the plugin manager...). Also, notice that SEXTANTE is adapted to run SAGA 2.0.8, not 2.1 (the one you have), which is not yet stable and has some algorithms with a different syntax. That is what is causing problems with that POWER parameter than SAGA is complaining about in the log Apr 23, 2013 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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