1

I would like to resample many geotiff layers to another geotiff layer's extent and pixel size. For this I would like to use the QGIS python console (editor). When I run my script it raises the following error:

File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 165, in setValue tokens = text.split(',') AttributeError: 'list' object has no attribute 'split'

When I run the saga resampling from the processing toolbox

enter code here
import processing
input ="/Users/rutgerhofste/GitHub/AlgeriaTest01/Data/Raster/CHIRPSMewina/CHIRPSMewinaY2012M01.tif"
keep_type = True
target = 0
scale_up_method = 0
scale_down_method = 0 
user_xmin = -17.0999999594
user_xmax = 35.7000007799
user_ymin = 14.6999995737
user_ymax = 37.
output_extent = [user_xmin,user_xmax,user_ymin,user_ymax]
user_size = 0.050000
user_grid = "/Users/rutgerhofste/Desktop/werkmap/testgrid.tif"
processing.runalg('saga:resampling', input, keep_type, target, scale_up_method, scale_down_method, output_extent, user_size, user_grid)

When I run the algorithm from the processing toolbox everything works fine

asked Feb 5, 2015 at 16:00

1 Answer 1

1

The Saga:processing python function demands extent to be a string "-17.0999999594,35.7000007799,14.6999995737,37.0" rather than a list or tuple.

answered Feb 5, 2015 at 16:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.