I'm updating my QGIS processing plugin algorithm from 2x - 3x.  The algorithm
generates and outputs one to many rasters. The number of output rasters is
unknown until the algorithm is run and depends on the input parameters.

In my QGIS 2x version, I just set a processing.core.outputs.OutputDirectory,
dumped all the rasters in there and then added them to the map using the
QgsMapLayerRegistry.instance().addMapLayer method.  A bit dodgy, but the 2x
version was just a quick proof of concept.

Is there a recommended approach for QGIS 3x in the processing framework to
handle an unknown number of outputs?  Or should I just  do something similar
to my 2x version, set a
QgsProcessingParameterFolderDestination/QgsProcessingOutputFolder and add
them to the map via QgsProject.instance().addMapLayer?


Regards
Luke



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to