1

I'm attempting to use the SAGA Ordered Weighted Averaging tool in QGIS (3.16) and am running into a few errors. Every time I've run the tool I've used the same number of inputs as weights in the table, but I still seem to be getting errors around that. Originally, I tried running the tool with eight input layers and received this error:

File "C:/PROGRA~1/QGIS3~1.16/apps/qgis/./python/plugins\processing\algs\saga\SagaAlgorithm.py", line 280, in processAlgorithm
s = '{}\t{}\t{}\n'.format(values[i], values[i + 1], values[i + 2])
IndexError: list index out of range

Execution failed after 0.04 seconds

More recently, I tried using some other test rasters as inputs and only three input layers, you can see from the inputs that I have three layers and three weights given:

Input parameters: { 'GRIDS' : ['C:/Users/ktyle/Documents/Thesis/Denver/OWA_Rasters_QGIS1/food_test.tif','C:/Users/ktyle/Documents/Thesis/Denver/OWA_Rasters_QGIS1/retail_test.tif','C:/Users/ktyle/Documents/Thesis/Denver/OWA_Rasters_QGIS1/wellbng_test1.tif'], 'OUTPUT' : 'C:/Users/ktyle/Documents/Thesis/Denver/OWA_Rasters_QGIS1/owa_test.sdat', 'WEIGHTS' : [0.10,0.10,0.80] }

This time the tool actually ran for more than a few seconds, but at the end I still got an error, which seemed to say that I only gave one weight.

Parameters


Grid system: 200; 760x 678y; 420596.428700x 4331253.154300y
Input Grids: 3 objects (foodtest, retailtest, wellbngtest1)
Weights: Weights (columns: 1, rows: 1)
Output Grid: Output Grid

Error : Wrong weights table. Check table dimensions

C:\WINDOWS\System32>exit
Execution completed in 15.93 seconds
Results:
{'OUTPUT': 'C:/Users/ktyle/Documents/Thesis/Denver/OWA_Rasters_QGIS1/owa_test.sdat'}

Loading resulting layers
The following layers were not correctly generated.
• C:/Users/ktyle/Documents/Thesis/Denver/OWA_Rasters_QGIS1/owa_test.sdat

Any ideas as to what I might be doing wrong?

Your Answer

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

Browse other questions tagged or ask your own question.