[QGIS-Developer] processing =output boolean workaround ?

Nyall Dawson nyall.dawson at gmail.com
Thu May 18 16:37:56 PDT 2017


On 14 May 2017 at 22:09, Andreas Plesch <andreasplesch at gmail.com> wrote:
> For use in models it is sometimes useful to generate a boolean output from a
> processing script. Since boolean is not available as output, what would be a
> good workaround ?
> I am simply using string as output type:
> output=str(False)
> but then the receiving script has to work a bit on that input and it is
> awkward to type 'True' if the input script is used standalone.
>
> Of course, the real question is why boolean is not offered as output type ?
> To me it would be useful.

I suspect there's no reason apart from that no-one has had the need
until now and accordingly no-one has coded this feature.

A PR would be very welcome! (after the upcoming outputs->c++ work lands)

Nyall


More information about the QGIS-Developer mailing list