Fwd: [Qgis-user] Python Batch Processing

Maurício de Paulo mauricio.dev at gmail.com
Fri Sep 11 05:47:32 PDT 2009


---------- Forwarded message ----------
From: Maurício de Paulo <mauricio.dev at gmail.com>
Date: 2009/9/11
Subject: Re: [Qgis-user] Python Batch Processing
To: Agustin.Lobo at ija.csic.es


Ok, the parameter textEdit is a place where you can set parameters just like
a shell command. The %dir: ...% tag is replaced for the filenames from the
folder in each iteration.
So you misplaced the file names there. Try cleaning the parameter box before
inserting the insert Repeat for Directory. (I don't think the gui is user
friendly enough on this use case).
Thanks for the feedback



2009/9/11 Agustin Lobo <Agustin.Lobo at ija.csic.es>

> It worked for gdalinfo and 1 file, but got
> this result when tried a directory (I selected Repeat for Directory and
> selected a directory).
> Will try a gdal_translate later and will let you know.
> Thanks
>
> Agus
>
> Maurício de Paulo wrote:
>
>>
>> http://ufpr.dl.sourceforge.net/project/pybatchproc/ScreenShots/main-gdal.jpg
>> This is just a simple example with gdalinfo
>> I've done a example that shows exactly the problem I'd like to solve with
>> this tool:
>>
>> http://master.dl.sourceforge.net/project/pybatchproc/ScreenShots/gdalwarp_ex.png
>>
>> http://master.dl.sourceforge.net/project/pybatchproc/ScreenShots/gdalwarp_results.png
>>
>> As you can see in the screenshots, the tool is just an interface to run
>> gdalwarp just like in the command line, but I can repeat the command
>> replacing the tags %subdir:/home/vatto...% by every file in that subdirs.
>>
>> I don't know if I did myself clear enough so any questions on usage or
>> sugestions on how to make it more user friendly are welcome.
>> Mauricio de Paulo
>>
>>
>> 2009/9/11 Agustin Lobo <Agustin.Lobo at ija.csic.es <mailto:
>> Agustin.Lobo at ija.csic.es>>
>>
>>    Thanks Mauricio, installed.
>>    You mentioned gdalutilites and FWT,
>>    could you provide an example of using
>>    a gdal utility (i.e. gdalbioldvrt or gdal_translate)
>>    and a FWT utility through your plugin?
>>
>>
>>    Agus
>>
>>    Maurício de Paulo wrote:
>>
>>        Ok, as promised, it now works also as a qgis plugin.
>>        I've uploaded it in the contributed repository so everyone could
>>        download.
>>        I hope you guys enjoy it. :D
>>        Maurício de Paulo
>>
>>        2009/9/10 Maurício de Paulo <mauricio.dev at gmail.com
>>        <mailto:mauricio.dev at gmail.com> <mailto:mauricio.dev at gmail.com
>>        <mailto:mauricio.dev at gmail.com>>>
>>
>>
>>           Ok, I havent started the pyqgis section yet. I was still working
>>           saving parameters to commands.
>>           I'm going to start this right now. It should be finished by
>>        the end
>>           of this evening.
>>           At the moment it only works standalone (just call it as a python
>>           program).
>>           Thanks for the interest
>>           Maurício de Paulo
>>
>>           2009/9/10 Agustin Lobo <alobolistas at gmail.com
>>        <mailto:alobolistas at gmail.com>
>>           <mailto:alobolistas at gmail.com <mailto:alobolistas at gmail.com>>>
>>
>>
>>
>>               Mauricio,
>>               how should we use it?
>>               I've unzipped under .qgis/python/plugins
>>               but the get an error upon qgis start up:
>>
>>               Couldn't load plugin "pybatchproc" from
>>               ['/usr/share/qgis/python',
>>               '/home/alobo/.qgis//python/plugins/symbology_ng',
>>               '/home/alobo/.qgis//python/plugins',
>>               '/usr/share/qgis/python/plugins', '/usr/lib/python2.6',
>>               '/usr/lib/python2.6/plat-linux2',
>>        '/usr/lib/python2.6/lib-tk',
>>               '/usr/lib/python2.6/lib-old',
>>        '/usr/lib/python2.6/lib-dynload',
>>               '/usr/lib/python2.6/dist-packages',
>>               '/usr/lib/python2.6/dist-packages/Numeric',
>>               '/usr/lib/python2.6/dist-packages/PIL',
>>               '/usr/lib/python2.6/dist-packages/gst-0.10',
>>               '/var/lib/python-support/python2.6',
>>               '/usr/lib/python2.6/dist-packages/gtk-2.0',
>>               '/var/lib/python-support/python2.6/gtk-2.0',
>>               '/usr/local/lib/python2.6/dist-packages',
>>               '/usr/share/qgis/python/plugins/fTools/tools',
>>        '~/.qgis/python',
>>               '/usr/share/qgis/python/', '/usr/share/qgis/python/',
>>               '/usr/share/qgis/python']
>>
>>               Traceback (most recent call last):
>>                File "", line 2, in
>>               ImportError: No module named pybatchproc
>>
>>               Python version:
>>               2.6.2 (release26-maint, Apr 19 2009, 02:11:59)
>>               [GCC 4.3.3]
>>
>>
>>               Agus
>>
>>               Maurício de Paulo wrote:
>>
>>                   Hi list,
>>                   As I am a serious user of GDAL Utilities and FWTools,
>>        I've
>>                   found myself manytimes trying to repeat a ogr2gr or a
>>                   gdalwarp for whole directories and writing much bash
>>        and bat
>>                   code for the task. As a solution the the guys who
>>        work with
>>                   me I've written the PyBatchProc script that is a QT
>>        gui to
>>                   run command-line tools for series of files in folders or
>>                   subfolders.
>>
>>                   I'm planning on creating a QGIS plugin script to let the
>>                   tool run from inside QGIS too.
>>
>>
>> https://sourceforge.net/projects/pybatchproc/files/pybatchproc_0_1.zip/download
>>
>>                   Any bugs found or sugestions are welcome.
>>                   I hope you enjoy.
>>
>>                   Maurício de Paulo
>>
>>
>> ------------------------------------------------------------------------
>>
>>                   _______________________________________________
>>                   Qgis-user mailing list
>>                   Qgis-user at lists.osgeo.org
>>        <mailto:Qgis-user at lists.osgeo.org>
>>        <mailto:Qgis-user at lists.osgeo.org
>>        <mailto:Qgis-user at lists.osgeo.org>>
>>
>>                   http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>>
>>
>>    --    Dr. Agustin Lobo
>>    Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
>>    LLuis Sole Sabaris s/n
>>    08028 Barcelona
>>    Spain
>>    Tel. 34 934095410
>>    Fax. 34 934110012
>>    email: Agustin.Lobo at ija.csic.es <mailto:Agustin.Lobo at ija.csic.es>
>>    http://www.ija.csic.es/gt/obster
>>
>>
>>
> --
> Dr. Agustin Lobo
> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
> LLuis Sole Sabaris s/n
> 08028 Barcelona
> Spain
> Tel. 34 934095410
> Fax. 34 934110012
> email: Agustin.Lobo at ija.csic.es
> http://www.ija.csic.es/gt/obster
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20090911/eb0210aa/attachment.html>


More information about the Qgis-user mailing list