[Qgis-user] Processing toolbox model vs script
Jonas Sjögren
jonas.sjo at gmail.com
Tue Oct 29 03:03:08 PDT 2013
Hi,
I have produced a model in the processing toolbox which uses the algorithm
'Reclassify grid values' and it works fine. Now I would like to make the
same calculation using a script, and I click 'Save as Python script' and it
jumps nicely into the box of User scripts in the toolbox. However, when
trying to run the script I get the following error:
'Oooops! The following output layers could not be open'.
- result_alg0:
When executing the model and the script the input forms are identical and I
use exactly the same inputs.
I am aware of that the Python interpreter from model to script is not
perfect (like typing Processing instead of processing), but I cannot see
any major errors in the script used:
##Calculate_ReclassifiedGrid_New_Model=name
##rasterlayer_demtot=raster
##number_waterlevel=number 0.0
##result_alg0=output raster
outputs_0=processing.runalg("saga:reclassifygridvalues",
rasterlayer_demtot, 1, 0.0, 1.0, 0, -2.4, number_waterlevel, 1.0, 0,
0,0,0,0,0,0,0,0,0, 0, True, 0.0, True, 0.0, result_alg0)
I tried to use my model algorithm 'modeler:calculate_reclassifiedgrid'
insted of 'saga:reclassifygridvalues', but with the same error. I have also
tried using SAGA 2.0.8 as well as 2.1.0. I am running
QGIS-OSGeo4W-2.1.0-42 on Windows 7 64 bit.
Does anyone have an idea how to get the script going?
Best regards,
/Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20131029/65d90f01/attachment.html>
More information about the Qgis-user
mailing list