Hi Volker, grazie per il tuo interessamento e il  prezioso aiuto

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 avoid build all GUI for each saga module in QGIS. This is quite tedious but I'll do it.

Really I'm study raster plugin

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

Il 15/02/2011 1.24, Volker Wichmann ha scritto:
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


PS: I'm not subscribed to the qgis-developer mailing list, so I'm not allowed to post to this mailing list.


<?xml version="1.0" encoding="utf-8"?>
<PARAMETERS name="Accumulated Cost (Anisotropic)">
  <OPTION type="grid_system" id="PARAMETERS_GRID_SYSTEM" name="Grid system">
    <CELLSIZE>-1</CELLSIZE>
    <XMIN>0</XMIN>
    <XMAX>0</XMAX>
    <YMIN>0</YMIN>
    <YMAX>0</YMAX>
  </OPTION>
  <DATA type="grid" id="COST" name="Cost Grid">NOT SET</DATA>
  <DATA type="grid" id="DIRECTION" name="Direction of max cost">NOT SET</DATA>
  <DATA type="grid" id="POINTS" name="Destination Points">NOT SET</DATA>
  <DATA type="grid" id="ACCCOST" name="Accumulated Cost">NOT SET</DATA>
  <OPTION type="double" id="K" name="k factor">2.000000</OPTION>
  <OPTION type="double" id="THRESHOLD" name="Threshold for different route">0.000000</OPTION>
</PARAMETERS>
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to