[Qgis-developer] [QGIS-Processing] Define optional parameters in Script

kimaidou kimaidou at gmail.com
Fri Sep 11 02:28:30 PDT 2015


Hi

I would personaly use the second : add a new property for each input. If
not given, this means the input is mandatory, if "opt" is present, make it
optionnal.

Cheers,
Michael

2015-08-28 14:53 GMT+02:00 René-Luc Dhont <rldhont at gmail.com>:

> Hi Victor,
>
> I'm working on porting QGIS Processing to Web Processing Service, and I
> have found that all parameters in a QGIS Processing script are mandatory.
> It would be useful to power define some parameters as optional.
>
> I think that I can propose some code but I'd like to know what is your
> preferred way of defining optional parameters :
> * an header line started by 'optional' with a list of parameter name
> separated by comma
> ##optional=SEGMENTS,DISTANCE
> * an extra value at the end of the header line
> ##SEGMENTS=number 5 opt
>
> Thanks
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150911/305b2147/attachment.html>


More information about the Qgis-developer mailing list