<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Thank you Victor. I updated to the
experimental version of the Processing Plugin and it is working as
you explain. I like the new editor too. <br>
<br>
I think the tag name is ##passfilenames and not ##passfilename as
it is written in the user guide. <br>
<br>
I noticed that ##passfilenames only effects input files. Is there
a way to specify an output file that is not output using
writeRaster? The reason I ask is that I sometimes need to process
an image in blocks using the Raster package WriteStart,
writeValues, and writeStop functions. It would be great if there
was a tag that would allow me to specify an output file that could
be used in that instance and still output the image in QGIS. I
have a workaround but it would be great if there was a more direct
way to do it.<br>
<br>
Thanks again for all your help.<br>
<br>
Ned<br>
<br>
On 02/11/2014 05:17 PM, Victor Olaya wrote:<br>
</div>
<blockquote
cite="mid:CAJsc-7wgunf5wio2rdEHngbdTSnwrQ=88DFvDDjjT9k622uzjA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">No, that's not the idea off ##passfilename, the
idea is that, instead of getting an R variable that is already a
vector/raster layer, you get a string with its filename, so you
can use it in R as you like. This was mainly done to allow the
user to open a raster layer using a different package, and not
use a fixed one and provide the layer object directly. So, if
you declare a variable "mylayer" as vector layer, Processing
will ask the user to select a vector layer, but the "mylayer"
variable will have the path to the selected file. If you do not
use ##passfilename, Processing will add some extra code, so the
variable will already point to a data object created based on
that filename.
<div>
<br>
</div>
<div>You can update to the newer version using the plugin
manager. You should enable the "show experimental plugins"
option, and you will see a new version of Processing.</div>
<div><br>
</div>
<div>To make feature requests, you can use the QGIS issue
tracker.</div>
<div><br>
</div>
<div>Thanks in advance!</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-02-11 22:51 GMT+01:00 Ned Horning
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:horning@amnh.org" target="_blank">horning@amnh.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hi Victor - <br>
<br>
Yes, I am using the version of Processing that comes
with QGIS 2.0.1.<br>
<br>
I played with it some more today and I don't get an
error if I use ##passfilenames (I added an "s" at the
end) but it still didn't seem to work. I'm assuming that
using ##passfilename will simply declare the directory
path and file name as a variable instead of actually
opening the file. It's quite possible I don't understand
the intended functionality. <br>
<br>
Can you let me know the best way to make comments or
make feature requests related to the R scripting
capability. I'm glad I finally got around to trying it
out.<br>
<br>
All the best,<br>
<br>
Ned
<div>
<div class="h5"><br>
<br>
On 02/11/2014 04:41 PM, Victor Olaya wrote:<br>
</div>
</div>
</div>
<div>
<div class="h5">
<blockquote type="cite">
<div dir="ltr">Hi Ned
<div><br>
</div>
<div>That looks like a bug when parsing the script
code. I will check to see what I can do.</div>
<div><br>
</div>
<div>Are you using the latest version of
Processing, or the one that comes with QGIS
2.0.1?</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-02-10 23:03
GMT+01:00 Ned Horning <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:horning@amnh.org"
target="_blank">horning@amnh.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex"> Hi -<br>
<br>
I am trying to learn to write R scripts using
the Processing Toolbox. I have a random forest
image classification script that works in the
processing toolkit but I'd like to modify it
to do more complex tasks. I think I need to
use the ##passfilename tag but every time I
add that to a script I get an error that I
pasted below. I tried several different
scripts and every time I add the
##passfilename tag I get the same error. Does
the ##passfilename tag need other parameters?
If anyone knows what the problem might be or
has pointers about how I can find the problem
please let me know?<br>
<br>
This R scripting capability has a lot of
potential and I'd like to write a guide on how
to use it but I still have a lot to learn
myself.<br>
<br>
All the best,<br>
<br>
Ned<br>
<br>
<br>
I'm running QGIS 2.0.1 on Ubuntu 12.04. This
is the error message:<br>
--<br>
An error has occured while executing Python
code:<br>
<br>
Traceback (most recent call last):<br>
File
"/usr/share/qgis/python/plugins/processing/r/EditRScriptDialog.py",
line 95, in runAlgorithm<br>
alg = RAlgorithm(None,
unicode(self.text.text()))<br>
File
"/usr/share/qgis/python/plugins/processing/r/RAlgorithm.py",
line 71, in __init__<br>
self.defineCharacteristicsFromScript()<br>
File
"/usr/share/qgis/python/plugins/processing/r/RAlgorithm.py",
line 82, in defineCharacteristicsFromScript<br>
self.parseDescription(iter(lines))<br>
File
"/usr/share/qgis/python/plugins/processing/r/RAlgorithm.py",
line 108, in parseDescription<br>
raise WrongScriptException("Could not load
R script:" + self.descriptionFile + ".\n
Problem with line \"" + line + "\"")<br>
TypeError: cannot concatenate 'str' and
'NoneType' objects<br>
<br>
Python version:<br>
2.7.3 (default, Sep 26 2013, 20:13:52)<br>
[GCC 4.6.3]<br>
<br>
<br>
QGIS version:<br>
2.0.1-Dufour Dufour, exported<br>
<br>
Python path:
['/usr/share/qgis/python/plugins/processing',
'/usr/share/qgis/python',
'/home/nedhorning/.qgis2/python',
'/home/nedhorning/.qgis2/python/plugins',
'/usr/share/qgis/python/plugins',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-installer',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode',
'/usr/share/qgis/python/plugins/fTools/tools']<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a moz-do-not-send="true"
href="mailto:Qgis-user@lists.osgeo.org"
target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>