[Qgis-developer] Re: [saga-gis-developer] saga - qgis interface

gianluca.massei g_massa at libero.it
Wed Feb 16 10:26:41 EST 2011


Hi Volker, thank you for your interest and the valuable help.
About xml file,  I'm referring to files as "accumulated.cost.spm" 
attached this mail, generated from "Accumulated Cost Anisotropic" module 
GUI.
Although now I've understand your opinion and I'm agree with you, my 
original idea was to automaticaly generate a GUI in QGIS (using pyQT) 
from something like xml file for capture parameters and past to a python 
script with saga_cmd (e.g. os.system("saga_cmd ").  In that way I hoped 
to generated "on the fly" GUI and  avoid build all GUI for each saga 
module in QGIS. With the GUI I can past all parametere from GUI to 
python script.
Actually, the use of saga_api is more robust  way for programming plugin 
even If it could be more difficult for installation and configuration.
My idea is build a plugin like  Gdal-Tool 
(https://trac.osgeo.org/qgis/browser/trunk/qgis/python/plugins/GdalTools?rev=13639). 



Thanks

Gianluca

> Hi,
>
> I don't know of a "save" button which outputs XML description - from 
> the GUI you can create batch/html output, do you refer to that?
>
> But I would not recommend to trust on this, I think it is a bad idea 
> to "hardwire" your plugin - every change in the module parameters 
> naming or even new parameters would break your implementation of a 
> SAGA module. For example, the RSAGA interface already suffered from 
> such an implementation.
>
> I think you should use the SAGA python API to dynamically parse the 
> parameters of each module - this would guarantee that your plugin 
> would work with every SAGA build used.
>
> I am not familiar with QGIS and its plugin design, but from all posts 
> regarding this topic I assume that you like to call a saga_cmd 
> subprocess from the GUI. I would like to support the writing of some 
> python code that would dynamically parse available SAGA modules and 
> their parameters in order to build up module dialogs in QGIS. Could 
> you point me to some sources which show the idea/implementation of 
> QGIS plugins? I'm not a python programmer, but I use it for scripting, 
> so maybe I could be of some help.
>
> Best regards,
> Volker
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: accumulated.cost.sprm
Type: text/xml
Size: 742 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110216/c122ca79/accumulated.cost.xml


More information about the Qgis-developer mailing list