Bug report #19236

Ordered weighted averaging error: can only concatenate list (not “str”) to list

Added by Somaria Sammy almost 6 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/SAGA
Affected QGIS version:3.0.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:27064

Description

When I use the ordered weighted averaging tool it fails and I get the following error message:

Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\saga\SagaAlgorithm.py", line 275, in processAlgorithm
s = values[i] + '\t' + values[i + 1] + '\t' + values[i + 2] + '\n'
TypeError: can only concatenate list (not "str") to list

History

#1 Updated by Nyall Dawson almost 6 years ago

  • Status changed from Open to Feedback

This is fixed in 3.2 master - but I honestly can't understand exactly what that algorithm is supposed to do. The saga docs don't give much clues - http://www.saga-gis.org/saga_tool_doc/2.3.0/grid_analysis_11.html , and I can't work out why the weighting parameter gives a 3x1 table for values. What do these actually represent? Any ideas?

#2 Updated by Somaria Sammy almost 6 years ago

I have found some explanations from tutorials-[[http://grindgis.com/software/qgis/raster-overlay-analysis-qgis]].

This tool allows you to do a weighted average of several raster layers. You select the layers you want to average and then in the weighting parameter table you put in what percentage you want each layer to be weighted.

The weighting parameter table is set to 3x1 by default but you can remove or add rows to match the number of layers you are averaging. E.g. If you add two layers as inputs and you want to weight them 60%, 40% then you would remove the extra row in the weighting parameter table and type in 60 and 40 in the remaining two rows.

Because the table doesn't show the layer names in it there is the chance that you might accidentally assign the wrong weight to the wrong layer.

#3 Updated by Alexander Bruy about 5 years ago

  • Resolution set to fixed/implemented
  • Status changed from Feedback to Closed

Reported issue already fixed.

Also available in: Atom PDF