[QGIS-Developer] Can I automatically style a layer generated with a Processing Sink?

David Marteau dmarteau at 3liz.com
Tue Sep 11 11:40:23 PDT 2018


Hi,

In python you may check the `processing.core.Processing.RenderingStyles` that enable you to associate a style (as a qml file) to a pair (alg, output). It is also possible to 
do that from the Qgis GUI  ( but I do not remember the details ). 


> Le 11 sept. 2018 à 20:00, C Hamilton <adenaculture at gmail.com> a écrit :
> 
> In a processing routine I create an output vector layer. 
> 
>         self.addParameter(
>             QgsProcessingParameterFeatureSink(
>                 self.PrmOutputLayer,
>                 tr('Output layer'))
>             )
> 
>         (sink, dest_id) = self.parameterAsSink(parameters,
>             self.PrmOutputLayer, context, fields, QgsWkbTypes.LineString, srcCRS)
> 
> I would like to style the output layer by enabling a label based off of one of the fields. Can I do this in Processing? I guess what I would like to get is the actual vector layer that is created. Is that possible?
> 
> Thanks,
> 
> Calvin
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180911/697b3503/attachment.html>


More information about the QGIS-Developer mailing list